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

Cannot specifiy custom headers #2

Closed
escardin opened this issue Nov 13, 2015 · 10 comments
Closed

Cannot specifiy custom headers #2

escardin opened this issue Nov 13, 2015 · 10 comments

Comments

@escardin
Copy link
Contributor

It is not currently possible to use the full http api you are wrapping, as I cannot set portions of my request object.

@chenkie
Copy link
Contributor

chenkie commented Nov 16, 2015

Thanks, this will be in the next release coming up shortly :)

@chenkie
Copy link
Contributor

chenkie commented Dec 17, 2015

This hasn't landed yet, but is on the way.

@NickLarsenNZ
Copy link

How soon might this be implemented? Currently my requests are sent out with Content-Type: text/plain, while the REST service is expecting application/json.

I imagine it could be something added to the new AuthHttp({...}) constructor, so it's setup once.

Do you accept pull requests? I could give it a shot.

@NickLarsenNZ
Copy link

I've just submitted a pull request, allowing custom headers.

@escardin
Copy link
Contributor Author

You need to be able to set headers on the fly, not during setup. I suppose I could rework my fork and submit a pr with code I've already written to do this.

@chenkie
Copy link
Contributor

chenkie commented Dec 21, 2015

I was thinking that too, but it would be useful to have both options.

@louisscruz
Copy link

Is there any progress on this? Any work around for those of us who need to change this? I, like Nick, have a backend expecting application/json.

@chenkie
Copy link
Contributor

chenkie commented Dec 29, 2015

Hey @louisscruz , the changes to make it work have been committed here and I'll aim to release after some more tests tomorrow.

@escardin
Copy link
Contributor Author

You can always tell npm to load the tarball from github, or the repo itself (assuming you are using git)

@chenkie
Copy link
Contributor

chenkie commented Jan 2, 2016

v0.1.4 now published

@chenkie chenkie closed this as completed Jan 2, 2016
chenkie pushed a commit that referenced this issue Apr 16, 2016
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

No branches or pull requests

4 participants