1.0.3 • Published 2 years ago

@jst_htet/http-client v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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'
    }
}
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago