arequest
Promise base request module
Last updated 2 months ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ 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

Current Tags

  • 3.0.1                                ...           latest (2 months ago)

8 Versions

  • 3.0.1                                ...           2 months ago
  • 3.0.0                                ...           a year ago
  • 2.0.7                                ...           2 years ago
  • 2.0.6                                ...           2 years ago
  • 2.0.5                                ...           2 years ago
  • 2.0.4                                ...           2 years ago
  • 2.0.3                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 8
This Month 16
Last Day 8
Last Week 0
Last Month 10
Dependencies (2)
Dev Dependencies (9)

Copyright 2014 - 2016 © taobao.org |