3. Designing Representations

Previous Next

This chapter describes how to design representations, how to use HTTP headers on requests and responses, choice of media types and formats, and error handling.

  1. How to Use Entity Headers to Annotate Representations
  2. How to Interpret Entity Headers
  3. How to Avoid Character Encoding Mismatch
  4. How to Choose a Representation Format and Media Type
  5. How to Design XML Representations
  6. How to Design JSON Representations
  7. How to Design Representations of Collections
  8. How to Keep Collections Homogeneous
  9. How to Use Portable Data Formats in Representations
  10. When to Use Entity Identifiers
  11. How to Encode Binary Data in Representations
  12. When and How to Serve HTML Representations
  13. How to Return Errors
  14. How to Treat Errors in Clients

{ 2 comments… read them below or add one }

Ramesh Mandaleeka March 5, 2010 at 7:21 pm

I wanted to see a recipe on representing content with relations. The recipe should be covering the use-cases one-to-one, one-to-many and many-to-many. I see most of the time people interact with relational databases and would love to see their entities over http and in a REST way.



Subbu Allamaraju November 27, 2010 at 10:39 pm


Chapter 5 deals with how to communicate relations between resources using links. Note that relations in database tables may or may not translate into resource relations. It all depends on your resource model.



Leave a Comment