Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 574 Bytes

README.md

File metadata and controls

37 lines (25 loc) · 574 Bytes

Resource.js

Create HTTP API clients with ease

Usage:

var $         = require('jquery');
var resource  = requrie('resource')({
  // Must provide your own http interface
  http: $.ajax
});

// Setup your api
var api = resource('http:/localhost:3000/api');
api.users = api('users');
api.books = api('books');

api.users.get(123, function( error, user ){
  
});

var bob = api.users(123);

bob.put( { interest: ['Having fun'] }, function( error, user ){
  
});

Install:

bower install resource
npm install resource

Docs COMING SOON!