Created
July 14, 2014 21:17
-
-
Save marti1125/3fa3beb5dfbf876c26cc to your computer and use it in GitHub Desktop.
npm rest client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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