Self-descriptive messages

Clients should express their preferred state through a host of request messages. A resource's current state gets communicated by the server to any client through a response message. For example, a wiki page editor can send a message to the server requesting to transfer a representation. The representation change may suggest a page update, which is the new state for the server-hosted and -managed web page. However, the server takes the call to accept or deny the client's request. As indicated in the previous paragraph, the self-descriptive messages may include metadata to carry and convey the additional details regarding the resource state, the representation format and size, and the message itself:

The core operations ...

Get Hands-On RESTful API Design Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.