Skip to content

Instantly share code, notes, and snippets.

@marti1125
Created July 14, 2014 21:17
Show Gist options
  • Save marti1125/3fa3beb5dfbf876c26cc to your computer and use it in GitHub Desktop.
Save marti1125/3fa3beb5dfbf876c26cc to your computer and use it in GitHub Desktop.
npm rest client
// registering remote methods
client.registerMethod("jsonGetInfAboutUserByEmail",
url_server+"/api/v1/users/?app_name="+app_name+"&app_key="+api_key+"&[email protected]", "GET");
client.methods.jsonGetInfAboutUserByEmail(function(data,response){
// parsed response body as js object
console.log(data); // iterate
// raw response
console.log(response);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment