Hypermedia representations

A Restful application should support hypermedia content, and following this constraint, a typical resource representing an order in xml would add controls (links or forms) so clients can navigate through your service protocol (in this case, make a payment):

	<%= html '

	rails training
	REST training
	512.45
	
	

'%>
Here the order is represented through a typical application/xml file, but it has something extra: controls that allows clients to decide what to do next. Or an example of a valid json representation with hypermedia:
{ "order" : {
		"product" : "rails training",
		"product" : "rest training",
		"price" : "512.45"
		"links" : {
			"link" : { "rel" : "self", "href" : "http://www.caelum.com.br/orders/1"},
			"link" : { "rel" : "payment", "href" : "http://www.caelum.com.br/orders/1/payment"}
		}
	}
}
Last of all, one could add the links on the Link header of the http response:
<%= html 'Link: ; rel="self", ; rel="payment"' %>