@ampatspell/sofa-request
v0.0.3
Published
Sofa http request
Downloads
9
Readme
sofa-request
Request class. Simple promise-based wrapper around request
module.
Defaults to { json: true }
import { Development } from '@ampatspell/sofa-logger';
import Request from '@ampatspell/sofa-request';
let logger = new Development({ identifier: 'demo' });
let request = new Request({ logger: logger });
request.send({
method: 'get',
uri: 'http://127.0.0.1:5984'
}).then(json => {
// { couchdb: 'Welcome', ... }
});