arequest
Promise base request module
Last updated a month ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install arequest 
SYNC missed versions from official npm registry.

arequest

Build Status npm Version JS Standard

Promise base request module

Installation

$ npm install arequest --save

Usage

'use strict'

const assert = require('assert')
const arequest = require('arequest')

// Send request
arequest({
  url: 'http://example.com',
  method: 'GET'
}).then((res) => {
  assert.equal(res.statusCode, 200)
  console.log(res.body)
  /* ... */
})

// Define custom request to handle sessions
let myRequest = arequest.create({
  jar: true
})

myRequest({
  url: 'http://example.com/sign',
  form: { /* ... */ }
}).then(() => {
  /* ... */
})

License

This software is released under the MIT License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 51
Dependencies (2)
Dev Dependencies (9)

Copyright 2014 - 2016 © taobao.org |