JSON requests made easy, for Node.js.
JavaScript
Latest commit cb9e8df Apr 10, 2011 @aseemk Minor tweak to readme.
Permalink
Failed to load latest commit information.
.gitignore
jsonreq.js
license.txt
package.json
readme.md
test_.js
test_server.js

readme.md

jsonreq for Node.js

JSON requests made easy. No more dealing with low-level HTTP events, chunked requests or responses, buffering, parsing, try-catching, etc. Just get and post to send and receive.

Installation

npm install jsonreq

Usage

var json = require('jsonreq');

json.get('http://api.example.com/foo.json', function (err, data) {
    // ...
});

var obj = {
    key: 'value',
    items: [1, 2, 3],
};

json.post('http://api.example.com/foo.json', obj, function (err, data) {
    // ...
});

Development

npm link

Testing

npm test