Dog throwing up white mucus and not eating

.
This can also occur with other.