Chapter 4. Producing and consuming Restlet representations


This chapter covers
  • Producing and consuming XML and JSON representations
  • Producing HTML using template representations
  • HTTP content negotiation
  • Simplifying representation handling with the converter service


In part 1 of the book, we had several opportunities to discuss representations. In chapter 1 we briefly explained that representations in REST are used to transfer resource state. We pointed to appendix A for an overview of the org.restlet.representation package and to appendix D for details on RESTful representation design, covering the definition of representation classes and the importance of hypermedia as the preferred mechanism to interact with an application in REST. ...

Get Restlet in Action: Developing RESTful web APIs in Java now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.