Spitting

Hi,
What's the purpose of constantly spitting during pregnancy? This is my 1st child and it's driving me insane making me have 2nd thoughts. What can I do to get rid of it?
Signed, concern mother.