5

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.

Paul Sonier
  • 38,903
  • 3
  • 77
  • 117

5 Answers5

6

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

Postman screenshot

mmdemirbas
  • 9,060
  • 5
  • 45
  • 53
4

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.

jBit
  • 2,971
  • 1
  • 24
  • 39
  • Not sure how that would help test with verbs like PUT and DELETE, but it looks like a useful tool anyhow. – Paul Sonier Jul 29 '11 at 17:12
  • 1
    Have you tried it? GET, POST, PUT and DELETE are available. I use this application to test my own RESTful services. It's not pretty, but it's effective. – jBit Jul 29 '11 at 17:17
  • 3
    +1. You can specify pretty much any verb you'll ever need in the Request Builder tab – Cameron Jul 29 '11 at 18:40
2

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.
manuel aldana
  • 15,650
  • 9
  • 43
  • 50
2

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

fumanchu
  • 14,419
  • 6
  • 31
  • 36
2

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.

Andaris
  • 635
  • 6
  • 15