icg-rest-client

0.1.3 • Public • Published

ICG Rest client

A simple rest client that reduces the amount of call management code that is required to use a typical rest/json API

Usage

var ICGRestClient = require("icg-rest-client");

// Create the client with the API base url
client = ICGRestClient("http://api.com/api");

client.get("resource", {}, function(err, data){

})

client.get("resource", {headers:secToken}, function(err, data){
  ...
})

client.post("resource", {headers:secToken, data:{name:"Test"}}, function(err, data){
  ...
})

client.put("resource/12", {headers:secToken, data:{name:"Test"}}, function(err, data){
  ...
})

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i icg-rest-client

      Weekly Downloads

      3

      Version

      0.1.3

      License

      MIT

      Last publish

      Collaborators

      • trimeego