Add "Content-Length" header to POST and PUT requests

When using ElasticSearch behind a reverse proxy, like Nginx, it requires the Content-Length header to be set. 
Also some versions of NodeJS might complain when doing an HTTP request and the path does not start with a slash.