0.0.8 • Published 7 years ago

zenio v0.0.8

Weekly downloads
132
License
MIT
Repository
github
Last release
7 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

7 years ago

0.0.7

7 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago