Media types

As everyone knows, clients and servers normally exchange resource representations. Typically, in a POST request, the request body contains a representation for a resource to be created. On the reverse side, in a GET request, the response body contains a representation of the received resource. Generally, formats are specified through the use of media types (alternatively termed MIME types). For non-binary data, it's JSON (media type = application/json) and XML (media type = application/xml). The Content-Type header in a request or response specifies the format of the representation.

Having understood the relevance of APIs for creating composite enterprises, IT professionals have unearthed a number of API design patterns, which ...

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.