Paul Sonier
Paul Sonier

Reputation: 39520

REST client utility

I'm developing a REST API, and am looking for a simple graphic utility that will let me test the full set of REST verbs (GET, PUT, POST, and DELETE); GET is obviously not a problem, but I'd like something that can encapsulate the basic functionality of being able to specify a content body for PUT / POST, specify headers, etc. I'm sure someone's done this sort of thing before, but I can't seem to find any references to a simple graphical bit of HTML / Javascript that will allow me to specify an endpoint, headers, body, etc. and execute a REST request. Such a thing would be very useful in many environments. Does anyone know of such a tool that's available without any licensing issues?

Note: ideally, I'd like to find something that can be embedded in a web page, i.e. no browser add-ons.

Upvotes: 5

Views: 3488

Answers (5)

Andaris
Andaris

Reputation: 635

WizTools.org RESTClient

RESTClient is an excellent open source Java application you may want to try that can be used to test a variety of HTTP communications (it supports GET, POST, PUT, DELETE, HEAD, OPTIONS, and TRACE). It features a GUI version and a CLI version to suit either manual or automated testing. Note that it also provides SSL and scripting support.

Though it can't be embedded in a web page (as per your request), being a Java application, it can easily be run on numerous plaforms. As it is my own REST API testing tool of choice, I can highly recommend it.

Screenshot:

enter image description here

I've included this last as your "ideal" said no browser add-ons, however ... I've tried numerous REST clients and by far the best I've used is the Chrome app: DHC.

DHC (aka Dev HTTP Client) is designed and developed by a developer for developers to make direct HTTP resource discovery, manipulation and testing more easily. Beside the main function, sending/receiving custom HTTP requests/responses, it allows permanently to save a request to a local repository for later reuse and moreover the request declaration can include variables that are context specific. With the use of contexts you can easily switch between various environments without modifying request declaration. (e.g. from a test environment to production)

If you can get past the browser add-on aspect, I would strongly recommend giving DHC a shot.

Upvotes: 2

mmdemirbas
mmdemirbas

Reputation: 9168

Although you said that browser plugins are second choice for you, I am using Postman Chrome plugin happily and recommend it.

Postman screenshot

Upvotes: 6

fumanchu
fumanchu

Reputation: 14559

Try Okapi: two files you can just drop into your webserver. It's free and free.

Upvotes: 2

manuel aldana
manuel aldana

Reputation: 16468

I once had similar requirement (test-utility inlined inside online-documentation to provide sample calls). Also no luck and couldn't find anything.

In the end I did:

  • Provide link to browser-addon RESTClient
  • Building little REST spefic HTML form (radio-buttons for verbs, URL field + payload). Backend was a simple controller respectively which was then forwarding the parameters to the real api. Very important was syntax highligthing for payload (XML, JSON) for me. For that I used nice JS-library code-mirror. Further more I had more control on the form (e.g. hiding/showing certain HTTP verb after entering URL). Overall building simple form as Rest Client was much less effort than I thought, which again shows that a good Restful API over HTTP makes clients very easy to develop.

Upvotes: 2

jBit
jBit

Reputation: 2981

I know this is not something you can embed, but if you just want to test your REST service with the relevant HTTP verbs I would recommend using Fiddler.

Upvotes: 4

Related Questions