Crest helps you troubleshoot REST insterfaces.
Hopefully, it helps you smile while you do it too.
Well, clone this repo.
Then, you'll probably need to
npm install some stuff. Stuff like:
With the dependencies installed, you should be able to do
And you'll be greeted with the
The idea with crest is that you can do basic rest operations very easily and get results.
But you need a few of the builtin commands to make jQuery really useful. Like this bad boy:
You can use
.load to load in the contents of a webpage into the jQuery context.
.load http://google.com // loads the google homepage url into the jQuery $ context. var $input = $('input'); // selects inputs from the homepage and makes them available at $input.
So that one's nice. What else is there?
I usually use this when I just need to quick see the contents of an api endpoint. It will also load the contents into
.get http://gdata.youtube.com/feeds/api/standardfeeds/most_popular?v=2&alt=json // result will now contain the json object returned by that api call result.version
Will append further calls to .load or .get with this site domain name. So,
.cs gdata.youtube.com .get /feeds/api/standardfeeds/most_popular?v=2&alt=json // same as the above example of .get.
Prints the current site to the console.
Adds basic auth credentials to all further calls within
rest. Useful when you need the credential your api calls.
.creds username password // sends basicauth credentials "username:password" with further rest calls .get http://somesite.info/protected/api/call
Ask, email, fork this repo, submit pull requests, etc.