how to get the request method from the response django code example Example: httpresponse django from django.http import HttpResponse