Python: get post parameters from response object (requests)

In requests, response object has PreparedRequest object and it only contains ‘raw’ post request parameters (not as dict). import requests response =‘’, data={‘foo’:’test’, ‘bar’:’test’}) print(response.request) # <PreparedRequest [POST]> raw_params = response.request.body print(raw_params) # foo=test&bar=test # raw post parameters(not dict)…

Django: csrf_exempt of class based view

To suppress csrf verification of class based view, @csrf_exempt decorator in doesn’t work in Django 1.4 . Instead, decorating the as_view function in works fine! from django.views.decorators.csrf import csrf_exempt urlpatterns = patterns(”, url(r’^$’, csrf_exempt(views.IndexView.as_view()), name=’index’),