Suppose I have a view as follows:
-- from django.views.generic import View
from django.http import HttpResponse
from braces.views import CsrfExemptMixin
class TestView(CsrfExemptMixin, View):
def post(self, request, *args, **kwargs):
# how to access the HTTP data here?
return HttpResponse(content='some response', status=200)
... and I want to access the data "12345" and "abcde" as in the command:
curl -X POST http://localhost:8000/test/ -d "foo=12345&bar=abcde"
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2ee2e83b-c240-492a-96f8-e3781e269710%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment