Answers for "settingheaders in supertest"

1

supertest set header for all requests

request(app)
  .set('Authorization', 'abc123') // DOES NOT WORK
  .post('/api')

request(app)
  .post('/api')
  .set('Authorization', 'abc123') // Works.
Posted by: Guest on January-22-2021

Code answers related to "settingheaders in supertest"

Browse Popular Code Answers by Language