Docs sates: "The callback argument gets 3 arguments. ... The third is the response body String or Buffer."
If response has an empty body (Content-length is 0) third argument is undefined, not String nor Buffer.
The "edge case" is JSON response. Empty body can't be parsed to something convinient, so, this case still results in undefined (may be it must be handled different way?).
Empty body must be passed as empty string, exclude JSON case