kakuna

1.0.1 • Public • Published

kakuna

ES6 promise wrapper around superagent. Currently using native-promise-only, but it should be removed any time later.

Why

There's a plenty of ways to integrate superagent and promises, this is just one of them. It has a better API, by making .end() return a promise.

Usage

Install it

npm install --save kakuna

Just like superagent, but promesified:

var request = require('kakuna')

request
  .post('/api/pet')
  .send({ name: 'Manny', species: 'cat' })
  .set('X-API-Key', 'foobar')
  .set('Accept', 'application/json')
  .end()
  .then((res) => {
  	// do what you want with my res.body
  })

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i kakuna

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • jugoncalves