aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/requests.md
diff options
context:
space:
mode:
authorTom Christie2014-11-05 11:14:41 +0000
committerTom Christie2014-11-05 11:14:41 +0000
commit52507006595af4f9da34491e4211bf7ae447a457 (patch)
tree5213e9c08f8829d90d817e15b080b2398cb74bcd /docs/api-guide/requests.md
parent2daf085100b32fd4c13add0fcfa2dbb97722de4a (diff)
downloaddjango-rest-framework-52507006595af4f9da34491e4211bf7ae447a457.tar.bz2
Add docs on request.accepted_renderer and .accepted_media_type
Diffstat (limited to 'docs/api-guide/requests.md')
-rw-r--r--docs/api-guide/requests.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/api-guide/requests.md b/docs/api-guide/requests.md
index 0696fedf..87425ed1 100644
--- a/docs/api-guide/requests.md
+++ b/docs/api-guide/requests.md
@@ -49,6 +49,20 @@ If a client sends a request with a content-type that cannot be parsed then a `Un
---
+# Content negotiation
+
+The request exposes some properties that allow you to determine the result of the content negotiation stage. This allows you to implement behaviour such as selecting a different serialisation schemes for different media types.
+
+## .accepted_renderer
+
+The renderer instance what was selected by the content negotiation stage.
+
+## .accepted_media_type
+
+A string representing the media type that was accepted by the content negotiation stage.
+
+---
+
# Authentication
REST framework provides flexible, per-request authentication, that gives you the ability to: