breaking into the unknown…

installing REST API tool in firefox

1 Comment

I have created a sample REST API in this post. To access any API service, You need to write REST client code in your application. But you can try out any API services in your browser itself, by installing one of the many available tools. Good REST client tools is available for both Firefox and Chrome. I will explain, installing one of the tool and how to use it in Firefox.

STEP 1 : Installing the REST client tool

=> open your Firefox browser

=>You can find the REST client tool, through below steps

click tool tab at top of browser  -> click web developer  from the list -> click get more tools ->click Extensions down the adds on tab -> search rest client -> install the one with the title : RESTClient, a debugger for RESTful web services by click the button add to Firefox

=> Once installed, you can see a brown square icon with a circle in it at top right hand side of the browser. click it to start the tool

STEP 2: Understanding the tool

The REST client UI in browser look like this

Firefox rest client

Firefox rest client

You can test any REST API with the above tool. To use any API, you need to have information about its various services, see the sample API created in this post and read its documentation. These are the things, you need to fill up in the above UI, before making a call.

Authorization :

It list various type of authorization you need to setup before accessing any API. In the sample API I have provided basic authorization with username and password. Thus, click on basic authorization, fill the username and password and click O.K. It is one time process and will set your authorization for the current session

Content Type :

You need to setup, the content type of your request body. In API documentation you can find various type of content type supported by it. You can set content type by : click on header -> click on custom header -> In the popup, fill up Content-Type in name field and application/xml or application/json or application/x-www-form-urlencoded or anyother as per your need  in the value field-> click O.K

This can be also a one time process and you do not need to change it untill, you want to try out with any other content type.

API Requests :

Set, proper method, url and body in the above Rest Client UI as specified by the API documentation and then click the send button

API Response :

Once, the request is completed, you can see Response tab appearing at the bottom with Header, Response Body(raw), Response Body(highlight),  Response Body(Preview). The Header will contain the status of the response i,e success or failed and the response body will contain the data returned by the API to you

Author: arunyadav4u

over 7 years experience in web development with Ruby on Rails.Involved in all stage of development lifecycle : requirement gathering, planing, coding, deployment & Knowledge transfer. I can adept to any situation, mixup very easily with people & can be a great friend.

One thought on “installing REST API tool in firefox

  1. Pingback: Building a RESTful API in a Rails Application | MK(Ruby on Rails developer)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s