Fix missing Content-length in response of API call

When the Content-length header is missing from the response, web server
will treat response as dynamic length response and will insert the
"Transfer-Encoding: chunked" in response header and may
insert extra numbers in the beginning and ending of the response body.
If the client couldn't handle chunked transfer encoding
(http://en.wikipedia.org/wiki/Chunked_transfer_encoding), the parsing
will fail.