django-rest-framework/docs/api-guide/content-negotiation.md

798 B

Content negotiation

HTTP has provisions for several mechanisms for "content negotiation" - the process of selecting the best representation for a given response when there are multiple representations available.

RFC 2616, Fielding et al.

TODO: Describe content negotiation style used by REST framework.

Custom content negotiation

It's unlikley that you'll want to provide a custom content negotiation scheme for REST framework, but you can do so if needed. To implement a custom content negotiation scheme, override BaseContentNegotiation, and implement the .select_parser(request, parsers) and .select_renderer(request, renderers, format_suffix)