It is narrated from Imam al-Shafi'i (may Allah have mercy on him) that Imam Hasan al-Basri (may Allah have mercy on him) used to say: The Prophet (peace and blessings be upon him) had no need of consultation; (he consulted) so that the rulers after him would take it as a sunnah.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13304