0.0.1 • Published 1 year ago

yy030913.request v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
1 year ago

Request

a simple request method use node nodejs(http or https). support redirect url auto fetch.

Usage

const request = require('yy030913.request')

let result = request("https://google.com", "get").then(function(result) {
    console.log(result)
}).catch((err) => {
    console.log(err)
})

or

async function test() {
    let result = await request("https://google.com", "get");
    console.log(result)
}

all levels: 'fatal', 'error', 'warn', 'info', 'debug', 'trace'

Acknowledgements

Nodejs http API http ⇗ Nodejs https APIg https ⇗

License

Licensed under MIT.

0.0.1

1 year ago