nodeunit-httpclient icon indicating copy to clipboard operation
nodeunit-httpclient copied to clipboard

Support request headers

Open elliotttf opened this issue 9 years ago • 1 comments

Some APIs use the accept header to negotiate the correct version to serve but it doesn't appear to be possible to set this during instantiation. Furthermore, nodeunit-httpclient assumes that if the data for a request is an object the content-type header should be application/json and not necessarily whatever the Accept header is set to. This PR allows the client to be instantiated with an appropriate content-type request header and prevents overriding the header with application/json if it has already been set.

elliotttf avatar Sep 05 '14 17:09 elliotttf

I don't really use this module any more but if you can merge in the latest changes from master (from your other PR) then I'll merge this in. Thanks!

powmedia avatar Sep 05 '14 23:09 powmedia