@jst_htet/http-client
v1.0.3
Published
Javascript plugin for requesting api
Downloads
1
Readme
Javascript plugin for requesting api
// ES6
import httpclient from '@jst_htet/http-client';
// Module Export / Import
const httpclient = require('@jst_htet/http-client');
const [err, res] = await httpclient.get('http://...', {
headers: {
Authorization: 'Bear token'
}
});
const [err, res] = await httpclient.post('http://...', {
username: 'hlm',
age: 18
}, {
headers: {
Authorization: 'Bear token'
}
});
// global configs
httpclient.globalConfigs = {
headers: {
Authorization: 'Bear token'
}
}