despair

2.1.2 • Public • Published

despair

Lightweight library for making HTTP requests.

let dp = require("despair")
 
dp('https://google.com/').text().then(console.log)
 
dp.get('https://httpbin.org/get').json().then(console.log)
 
dp.post('https://httpbin.org/post', { data: { rawr: true }, type: 'json' }).json().then(console.log)
 
let res = await dp.get('https://httpbin.org/get')
console.log(res.headers, res.body)
 

Readme

Keywords

none

Package Sidebar

Install

npm i despair

Weekly Downloads

2

Version

2.1.2

License

MIT

Unpacked Size

3.6 kB

Total Files

3

Last publish

Collaborators

  • bakapear