Added function to do HTTP post request with document in JSON.
Fixed merge conflict.