Sahih Muslim 5023
The Book of Hunting, Slaughter, and what may be Eaten
وَحَدَّثَنِي مُحَمَّدُ بْنُ حَاتِمٍ، حَدَّثَنَا مُحَمَّدُ بْنُ بَكْرٍ، أَخْبَرَنَا ابْنُ جُرَيْجٍ، أَخْبَرَنِي أَبُو الزُّبَيْرِ أَنَّهُ سَمِعَ جَابِرَ بْنَ عَبْدِ اللَّهِ، يَقُولُ أَكَلْنَا زَمَنَ خَيْبَرَ الْخَيْلَ وَحُمُرَ الْوَحْشِ وَنَهَانَا النَّبِيُّ صلى الله عليه وسلم عَنِ الْحِمَارِ الأَهْلِيِّ .
Jabir b. '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
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.