Open Brunoaqu opened 1 year ago
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');
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