Using rest-shell to test rest services


A great tool for consuming and testing restful web services is rest-shell.

In an writing these notes for OS X on a Mac.  The instructions I am following come from here.

Install HomeBrew

Open a terminal window and enter the following command:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

This will download and install Homebrew.
Next, enter;

brew doctor

For me, this flagged that my Quartz was out of date, so I updated it by opening the url flagged up by Homebrew – https://xquartz.macosforge.org
Download and run, XQuartz-2.7.6.dmg.
Now, re-run

brew doctor

I am now told that my system is ready to brew.

Install Rest-Shell

Open a terminal window and enter the following command

brew install rest-shell

This downloads and builds rest-shell.

Run Rest-Shell

Launch your restful web service. If you don’t have one you can try following my earlier post Produce Json From Restful CXF Web Service.
Open a terminal session and enter:

rest-shell
baseUri http://localhost:8080/SimpleCXFRest/rest/customer
get find/1

This will display the following output:

004-rest-shell

More information

For more information on rest-shell take a look at Getting Started with the rest-shell

Advertisement

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Connecting to %s