Ibn 'Umar reported that Allah's Messenger (ﷺ) forbade the eating of the (flesh) of domestic asses on the Day of Khaibar in spite of the fact that people needed that.
Sahih Muslim Book 34, Hadith 38