From fdc0711812d87f11a5e8aac69206c0b05ca65b37 Mon Sep 17 00:00:00 2001 From: Ryan P Kilby Date: Wed, 27 May 2015 12:33:56 -0400 Subject: [PATCH] Updated documentation on calling _request.body --- rest_framework/request.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rest_framework/request.py b/rest_framework/request.py index 5f87060e8..f45a201f7 100644 --- a/rest_framework/request.py +++ b/rest_framework/request.py @@ -382,6 +382,9 @@ class Request(object): # Reading the request body before directly accessing the POST attr will # ensure the request body is stored, making it accessible again later. + # DRF uses multipart/form-data by default, which triggers an optimization + # in the underlying django request. For more details: + # https://github.com/django/django/blob/1.8.2/tests/requests/tests.py#L353-L372 self._request.body data = self._request.POST