1.0.5 • Published 9 years ago

node-xhr v1.0.5

Weekly downloads
31
License
MIT
Repository
github
Last release
9 years ago

node-xhr

Asynchronous HTTP request utility for node, just like XMLHttpRequest.

var xhr = require('node-xhr');

xhr.post({
    url     : 'http://localhost:3000/v1/test',
    headers : {
        'Content-Type' : 'application/json',
    },
    params  : {
        // ...
    },
    body    : {
        // ...
    },
}, function(err, res) {
    if (err) {
        console.log(err.message);
        return;
    }

    console.log(JSON.stringify(res.status));
    console.log(JSON.stringify(res.headers));
    console.log(res.body);
});

Installation

You can install it by npm install node-xhr.

Documentation

About more details, please see API doc.

License

The code under The MIT License

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago