-
Notifications
You must be signed in to change notification settings - Fork 27
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
Get with header isn't working #24
Comments
@RichardJECooke I can't speak to using the new |
The await part isn't relevant, it just compiles down to yield or something. But can you please give example code for superagent.get with a header that you use? There's none on the homepage and it's the only thing I can't get to work. POST works fine. |
I linked to https://github.com/yahoo/elide-js/blob/master/lib/datastores/jsonapidatastore.js#L975-L977 in my comment to a function we are using to set headers on a I can't speak to the capacity of this library to function using ES7+ features. We don't use anything beyond ES2015, if it doesn't work and you need it to feel free to submit a PR. |
Please put a line in the documentation explaining how to set headers in a get. It works in superagent but I can't figure out how to do it in superagent-promise. These both fail:
const result = await superagent('GET', url).set('token', testData.token).end();
const result = await superagent.get(url).set('token', testData.token).end();
The text was updated successfully, but these errors were encountered: