Hadithcore
Hadith #2112780

Narrated Jabir (RA):

In the lifetime of Allah's Messenger (ﷺ) when the Qur'an was being revealed, we used to engage in 'Azl. Hence, if it had been something forbidden, the Qur'an would have forbade us from doing it. [Agreed upon].

وَعَنْ جَابِرٍ ‏- رضى الله عنه ‏- قَالَ : { كُنَّا نَعْزِلُ عَلَى عَهْدِ رَسُولِ اَللَّهِ ‏- صلى الله عليه وسلم ‏-وَالْقُرْآنُ يَنْزِلُ , وَلَوْ كَانَ شَيْئًا يُنْهَى عَنْهُ لَنَهَانَا عَنْهُ اَلْقُرْآنُ } مُتَّفَقٌ عَلَيْهِ [1]‏ .‏

References2 variants
Sunnah.com reference
Book 8, Hadith 71
Arabic/English book reference
Book 8, Hadith 1035