Skip to content
josedonizetti edited this page Feb 2, 2011 · 30 revisions
![restfulie](http://restfulie.caelumobjects.com/images/restfulieSprites-trans.png)

Getting started

Suppose you have an uri (entry point) that returns an xml representing an order you have made. The Xml have two hypermedia links to be consumed. If you wanna pay for the order, you have to make an POST request to the link returned or and DELETE request canceling it.

The xml would be as follow:

rails training REST training 512.45

What we need to do is use Restfulie to make the request, informing the entry point.

  Response response = Restfulie.at("http://caelum.com.br/orders/1").accetp("application/xml").get();
  Order order = response.getResource();
  resource(order).getLink("payment").follow().post(new Card(444));
Clone this wiki locally