i copy it from stackoverflow since i didn't see an example for post with data in the http api.