Replace curl POST function with native net/http POST function