Link Details

Whilst previous posts have looked at the use of RESTClient, this post will concentrate on its parent class, HTTPBuilder and also touch briefly on the JSONBuilder class. This post will cover the building and parsing of JSON, converting JSON to and from POJOs, adding authentication headers and handling response success and failures.

Posted by gdhjones  |   Feb 27 2013 / 08:41

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Comments

User 312194 avatar

octix replied ago:

Nice, but POSTing to get a list of customers seems odd...

Reply 0 votes
User 389933 avatar

gdhjones replied ago:

The code sample was adapted from a real life example where it had to be a POST but in general such a request would be a GET.

Reply 0 votes

Recommended Links

Scala
Written by: Ryan Knight
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Play
  3. Akka
  4. Debugging JavaScript
  5. Design Patterns
  1. Apache Hadoop
  2. REST
  3. Java
  4. Git
  5. Java Performance
Connect with DZone