Over a million developers have joined DZone.

Resty for Java - a simple, light-weight HTTP/REST client API

DZone's Guide to

Resty for Java - a simple, light-weight HTTP/REST client API

Free Resource

Resty is a small, convenient library to talk to RESTful services from Java.

It’s surprisingly complex to do the simplest HTTP calls with the standard Java library. Resty hopes to change that.

Its focus is on simplicity and ease-of-use, often requiring only two lines of code to access RESTful web services.

Check it out here: http://beders.github.com/Resty/Resty/Overview.html

Example code for using the Yahoo Search Webservice, parsing the result as XML and getting the title of the first result as String.

Resty r = new Resty();
String firstResult = r.xml("http://api.search.yahoo.com/WebSearchService/V1/webSearch",


New in version 0.2.0: Support for PUT, DELETE, application/multipart-formdata



Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}