Thursday, 28 November 2013

Test REST API (Http GET/POST ) - using Chrome and Mozilla Firefox Add-on Tools

The typical HTTP call with GET/POST method can be tested using Free browser based extension tools like POSTER 3.1.0 ,SOA CLIENT 2.0,HTTP Resource Test etc.

POSTER – this tool lets you make HTTP GET and POST calls on REST enabled services.

  • Open Mozilla Browser > Tools  > Add-Ons  > Extensions Search for POSTER  > Click Install.

  • You Might need to restart the browser.




  • Thereafter, to use the Installed tool ; go to Tools > Poster


Now testing a publically available sample HTTP POST Service.

Let me take a service,from https://developers.google.com/accounts/docs/AuthForInstalledApps



Here we have a basic Login API exposed by GOOGLE ,that takes in accountType and Email and Password in Request Body

            accountType=HOSTED_OR_GOOGLE&Email=YOUR_GMAIL_ID@gmail.com&Passwd=YOUR_PASSWORD

  • Click !! POST Button


Response:

A success response contains the authorization token, labeled "Auth", in the body of the response. Your application must reference this token in each request to the Google service for this user. Additional cookies, labeled "SID" and "LSID”.

1 comment: