Closed natevw closed 8 years ago
This is getting addressed on the 'upcoming' branch. See #51 for discussion of API.
I think this is done enough. You can now pass an options object with responseType:'buffer'
, and autoConvert will handle it when possible.
Right now it's sort of an intentional coincidence that [in node.js at least] one can pass
Buffer(0)
as the data to a GET request to set the internaltextResponse
to false. It'd be nice to make this cleaner.Also, some of the autoConvert types assume a text response. JSON and plain text both trigger a default UTF-8 conversion to string but the others don't.