Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 1.26 KB

README.md

File metadata and controls

23 lines (19 loc) · 1.26 KB

superinstance

allow creation of separate instances of superagent

Build Status codecov npm downloads js-standard-style Commitizen friendly semantic-release

Usage

import request from 'superinstance';
const server = express();
const app = request(server); // or request('http://example.io/');
const instance = app.set('authorization', `Bearer ${token}`);

await instance.post('/graphql').send({ query, variables: { input } });
await instance.get('/image');
...