Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support request headers #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

elliotttf
Copy link
Contributor

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.

@powmedia
Copy link
Owner

powmedia commented Sep 5, 2014

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants