What has changed
For GET requests, nothing has changed.
For POST requests, instead of looking in request.POST the middleware now looks in request.GET, request.body then request.POST (in that order).
Why has this changed
This allows AJAX requests to be made to views that require a request_token, since request.POST is empty if content-type is 'application/json'. We are also checking request.GET since it means we can put the request-token in the url for the POST action, and don't have to pass it down, and add it to the body.
What has changed For GET requests, nothing has changed. For POST requests, instead of looking in
request.POST
the middleware now looks inrequest.GET
,request.body
thenrequest.POST
(in that order).Why has this changed This allows AJAX requests to be made to views that require a request_token, since
request.POST
is empty if content-type is 'application/json'. We are also checkingrequest.GET
since it means we can put the request-token in the url for the POST action, and don't have to pass it down, and add it to the body.