http-instance-request
v0.7.2
Published
http request
Downloads
5
Readme
http-instance-request
install
yarn install http-instance-request
# or
npm install http-instance-request
example
import {request} from "http-instance-request";
import {URL} from "url";
(async () => {
const {status, headers, body} = (await request({
url: new URL('https://example.com'),
options: {
method: 'GET'
}
})).unwrap();
console.log('> status:', status);
console.log('> headers:', headers);
console.log('> body:', body);
})();