It was narrated from Anas bin Malik that the Messenger of Allah (ﷺ) spat on his garment while he was performing prayer, then he rubbed it.
Sunan Ibn Majah Book 5, Hadith 222