I am using Google chrome extension tool Simple REST Client to test my web services. How to call post method with multiple parameters. I searched in internet, there is no enough documentation for this app.
Example POST method
@POST
@Path("createcategory")
@Consumes("application/x-www-form-urlencoded")
@Produces(MediaType.APPLICATION_XML)
public void CreateCategory(@FormParam("cname") String cname,@FormParam("cdescription") String cdescription)
{
CategoriesBO category = new CategoriesBO();
category.setCategoryName(cname);
category.setCategoryDescription(cdescription);
CategoriesEntityHandler handler = new CategoriesEntityHandler();
try {
category = handler.createCategory(category);
} catch (Exception e) {
}
}
Step 1: Go to the 'Chrome Web Store' then search for 'Advanced search Client' and click on 'Advanced Rest Client'. Step 2: Click on 'Add to crome' button'. Step 3: Click on the 'Add extension' button to add Advanced Rest Client on Google Chrome Extension.
Rest Client for Visual Studio Download this extension from the VS Marketplace or get the CI build. REST Client allows you to send HTTP request and view the response in Visual Studio directly.
One of the easiest ways to start testing REST APIs in Chrome is by installing a REST client such as Talend or vREST. These plugins can help you to test the REST APIs you are working on. Once you have the extension you prefer, you can start sending requests and receiving responses that help you test the REST API.
For "Headers", each header needs to be on a newline:
Content-Type: application/json
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
While "Data" needs to be in json-format, so something like this:
{"login":"USERNAME","password":"PASSWORD"}
using a paramlist did not work for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With