Tuesday, May 20, 2014

Execute Alfresco RESTful APIs using "Advanced REST client "

     There are numerous of plugins are available in Google Chrome and FireFox browsers for doing rest calls like Poster,Rest-Console etc.

I found "Advanced REST client" is the best one as it is providing advanced facility like saving history and project but its user interface is pretty awful.I dont like that one  :)

For understanding How one can use "Advanced REST client"  in actual scenarios, I am taking example of doing post request with json data as body.

First we need to install "Advanced REST client" chrome extension in Google Chrome browser.
You can find it here https://chrome.google.com/webstore/search/advanced%20rest%20client .

After installing "Advanced REST client" chrome extension in Google chrome, go to chrome://apps/.

You can find the icon for "Advanced REST client" extension.Click on it.Its home will look like :






Now, enter the URL of your rest call in URL tab.

Select Post request method and add header parameters in "Header" panel.

By clicking on "Form" tab, you can add your credentials as header parameters.
You can also new header parameter by click on "Add new Header" link.

Write your raw json data in "Payload" panel.
By clicking on "Raw" tab, you can add your raw json data in payload.

As we are passing json data in body,we will  select "application/json" from drop down.
Now our page look like following :






Now click on "send" button, you will get response in response tab.
You can also save the request and in future you can use it.

No comments:

Post a Comment