       method: @method
       headers: @headers
 
-    if @body
+    if @body && Buffer?
       @headers["Content-Length"] = Buffer.byteLength(@body)
 
     raw = client.request parameters, (response) =>

  process: (callback) ->
    # TODO: take encoding into account
    # TODO: check content-length against actual length
    @buffer = Buffer.concat @chunks, @length
    @process_encoding =>
      @process_type callback


  string.toLowerCase()
    .replace("_", "-")
    .replace /(^|-)(\w)/g, (s) -> s.toUpperCase()

module.exports = class Request

