Jabir bin 'Abdullah reported that Allah's Messenger (ﷺ) prohibited eating of the flesh of domestic asses on the Day of Khaibar, and permitted the cooking of the flesh of horses.
Hadith Referenceصحيح مسلم / كتاب الصيد والذبائح وما يؤكل من الحيوان / 1941
Jabir bin 'Abdullah is reported to have said: We ate during the time of Khaibar the (flesh) of horses and of wild asses, but Allah's Messenger (ﷺ) prohibited us (to eat) the flesh of domestic asses.
Hadith Referenceصحيح مسلم / كتاب الصيد والذبائح وما يؤكل من الحيوان / 1941