Saturday, October 29, 2011

RESTful Web Services: DeliciousHttpClient Example

I have been working on designing a replacement architecture for an enterprise application at work. As a result, I have been doing a lot of work with REST. The seminal work on REST is RESTful Web Services by Leonard Richardson and Sam Ruby from O'Reilly & Associates. The book is a couple of years old, but relevant today. There is only one issue with the book. There are a number of examples that do not work as expected in the current framework editions.
One such example is using Apache Commons HTTP Client. This particular framework is deprecated, and has been replaced by Apache HTTP Components.
The example code below demonstrates how to perform a RESTful call to to retrieve saved bookmarks. This is based on the application listed on page 35 of the book.
The Apache Maven based project can be downloaded here:


Popular Posts