HTTP Requests With Headers – Rest Clisent

Trigger http requests with headers or different request methods with help of rest client.

If you are planning to test Services with different request methods (GET/PUT/POST/HEAD etc) the Rest Client (Chrome Plugin) is the best tool that makes the testing really easy and shows the complete server response with detailed information. Apart from different request method Rest Client plugin allows you to trigger different headers with URL.

Here is the process how to install and work with rest client to trigger different headers and request methods with URL.

Download and install Rest Client Plugin in Chrome browser :

Go to the link https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo

and install the app. While installing it will ask to provide the google login. If you have google account please login with taht account. If you don’t have google account please create new one.

Once Rest client will be installed it will show you in google app page :

http-request

 

Work with rest client :

Client on Advanced REST client logo will open rest client page in different tab with the options GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS/Other

http-request-chrome1

 

You can type the url as you want to test with and select the appropriate the request typ from radio buttons.

Client on Send button with trigger the request.

Add Headers :

As described above this app provides to add the additional headers along with the URL.  To add http header with the http request, click on Form tab and then click on add new header will ask you to add key and value for the header. Provide the appropriate header name and the value of the header that you want to trigger. 

http-request-chrome2

 

Also you can add more than one header by clicking on Add new header link.

Once you add header name and values and selected the required request method you can click on Send button will trigger the request with configuration and will send back their server response that also you can view and analyze as result.

http-request-result

 

http-response

3 Responses to “HTTP Requests With Headers – Rest Clisent”

  1. swathi nagaraj says:

    Can we hide the request and response headers. If yes please let me know. I have tried by adding these “WebOperationContext.Current.OutgoingResponse.Headers.Clear();” and “WebOperationContext.Current.IncomingRequest.Headers.Clear();” but still I am able to view request and response headers.

  2. shashank says:

    is it possible to write a rest api in java which directly runs a given url in advanced rest client and stores the output in a variable? If yes, please tell me how.

    • Vikrant says:

      Yes, it is possible to achieve it in java by rest-assured api.
      methods are provided in this api to perform get,post,put, delete etc. operations

Leave a Reply

Your email address will not be published. Required fields are marked *