hyperagent

hyper+json client for node.js and the browser

hyperagent

hyper+json client for node.js and the browser.

$ npm install hyperagent
$ component install hypergroup/hyperagent

Call the hyperagent function, passing the root url of the hyper+json API.

var hyperagent = require('hyperagent');
 
var client = hyperagent('http://api.example.com');

Use the client to traverse any paths

client('.users.0.name', function(errname) {
  console.log('Hello, ' + name);
});
 
client('.users.0.friends.0.friends.0.name', function(errname) {
  console.log('Hello friend of a friend, ' + name);
});
client.submit('.users.0.update', {name: 'Mike'}, function(errbodyres) {
  console.log(res);
});