0.0.8 • Published 6 years ago

zenio v0.0.8

Weekly downloads
132
License
MIT
Repository
github
Last release
6 years ago

zenio

HTTP request with Promise

Install

npm install zenio --save

Usage

const zenio = require('zenio')

(async function() {
  zenio.setOptions({
    json: true
  })
  let repo = await zenio.get('https://api.github.com/repos/junyiz/zenio', null, {
    'User-Agent': 'zenio'
  })
  console.log('repo id:', repo.id, 'repo name:', repo.full_name)
})()

or

const zenio = require('zenio')

zenio.setOptions({
  json: true
})
zenio.get('https://api.github.com/repos/junyiz/zenio', null, {
  'User-Agent': 'zenio'
}).then(function (repo) {
  console.log('repo id:', repo.id, 'repo name:', repo.full_name)
}).catch(console.error)

License

MIT

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago