supertest with api key code example
Example: supertest set header for all requests
request(app)
.set('Authorization', 'abc123') // DOES NOT WORK
.post('/api')
request(app)
.post('/api')
.set('Authorization', 'abc123') // Works.
request(app)
.set('Authorization', 'abc123') // DOES NOT WORK
.post('/api')
request(app)
.post('/api')
.set('Authorization', 'abc123') // Works.