request.method django code example
Example 1: httpresponse django
from django.http import HttpResponse
Example 2: django require_POST body
# body -> {"name":"foo", "surname":"bar}
def my_view(request):
print(request.POST) # print the QueryDict object
print(request.POST.get('name') # print foo