support buffer and string body
sets content-length
sets status code
JSON response