Link Details

Link 931157 thumbnail
User 389933 avatar

By gdhjones
Published: Feb 27 2013 / 08:41

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.
  • 6
  • 0
  • 876
  • 319


Add your comment
User 312194 avatar

octix replied ago:

0 votes Vote down Vote up Reply

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

User 389933 avatar

gdhjones replied ago:

0 votes Vote down Vote up Reply

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.

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.

Voters For This Link (6)

Voters Against This Link (0)

    Apache Hadoop
    Written by: Piotr Krewski
    Featured Refcardz: Top Refcardz:
    1. Play
    2. Akka
    3. Design Patterns
    4. OO JS
    5. Cont. Delivery
    1. Play
    2. Java Performance
    3. Akka
    4. REST
    5. Java