nio

Node.js IO.

npm install nio
20 downloads in the last week
20 downloads in the last month

nio Build Status Coverage Status Code Climate NPM version

Node.js IO.

Installation

$ npm install nio --save

Usage

Node.js

var nio = require('nio');

API

nio.request.get([protocol], options, callback)

See the possible options here.

nio.request.get('https', {
    hostname: 'github.com',
    path: '/clebert/nio'
}, function (error, response, data) {
    // ...
});

nio.request.post([protocol], options, [data], callback)

See the possible options here.

nio.request.post('https', {
    hostname: 'github.com',
    path: '/clebert/nio'
}, 'data', function (error, response, data) {
    // ...
});

nio.util.handleError(errorCallback)

var errorHandler;

errorHandler = nio.util.handleError(function (error) {
    throw error;
});

nio.request.get('https', {
    hostname: 'github.com',
    path: '/clebert/nio'
}, errorHandler(function (response, data) {
    // ...
}));

Running the tests

To run the test suite first install the development dependencies:

$ npm install

then run the tests:

$ npm test

License

Licensed under the MIT license.

npm loves you