Added Content-Lenght header support for RFC 2616.
Use of dictionaries for JSON.