We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How I would like Superagent to be:
const superagent = require('superagent') const agent = superagent(app).createAgent() agent.set({ accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c', refreshToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' }) agent.get('/currentUser')
The text was updated successfully, but these errors were encountered:
i belive you can do something like this:
const superagent = require('superagent') const request = superagent .agent(app) .set({ Accept: 'applicaion/json', 'x-custom': 'custom' }); const response = await request.get('/my/url');
Sorry, something went wrong.
No branches or pull requests
Configuring request header before specifying the method, or creating agent instances that keep memory of what we configured him with.
How I would like Superagent to be:
Checklist
The text was updated successfully, but these errors were encountered: