mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-03 13:14:30 +03:00
798 B
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)