Yeah, I was wrong, I actually use request.body in my code without problem with the default middlewares enabled.
On Sat, Apr 23, 2016 at 11:00 AM, Daniel Roseman <[email protected]> wrote: > On Wednesday, 20 April 2016 21:29:09 UTC+1, Mihai Corciu wrote: >> >> Is there a method to access request.body from a POST request in Django, >> without disabling 'django.middleware.csrf.CsrfViewMiddleware' ? >> >> CsrfViewMiddleware is causing: >> >> Exception Type: RawPostDataException >> Exception Value: You cannot access body after reading from request's >> data stream >> >> which means request.body is impossible to acces without disabling >> CsrfViewMiddleware. >> > > > This should not be happening. CsrfViewMiddleware is enabled by default and > does not interfere with reading request.body. Please post the full > traceback. > -- > Daniel. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/46923ca1-1752-474e-a607-708dfd7a44d3%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/46923ca1-1752-474e-a607-708dfd7a44d3%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALn3ei02E%3DMa-vvjgDO%3DkdwsiAJHd%2B1YeDgjx9HvXssG8jNwTQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

