The Apostle of Allah (may, peace be upon him) saw spittle or snot or sputum, sticking to the wall towards Qibla and scratched it off.
Sahih Muslim Book 5, Hadith 65