Anas bin Malik reported,

The Messenger of Allah ﷺ saw some phlegm on the wall facing the qiblah inside the mosque and scraped it off. The displeasure of it showed on his face, and he said, "When a servant stands in prayer, he is conversing privately with his Lord عز وجل, and his Lord is between him and the qiblah. So when one of you needs to spit, let him spit to his left, or beneath his left foot, or let him do like this."Then he took the edge of his garment, spat into it, and rubbed one part against the other.

Ahmad 13066

Sahih

حدثنا يزيد حدثنا حميد

عن أنس بن مالك

أن رسول الله ﷺ رأى نخامة في قبلة المسجد فحكها فرئي في وجهه شدة ذلك عليه فقال إن العبد إذا قام يصلي فإنما يناجي ربه عز وجل فيما بينه وبين القبلة فإذا بصق أحدكم فليبصق عن يساره أو تحت قدمه اليسرى أو يفعل هكذا وأخذ طرف ردائه فبصق فيه ثم دلك بعضه ببعض

أحمد 13066صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Anas bin Malik
Numbering
Darussalam 13066
Ahmad 13066