def METHOD_NAME(request):
    if request.META.get('REQUEST_METHOD') == 'POST':
        return request.POST.get('_format')
    elif request.META.get('REQUEST_METHOD') == 'GET':
        return request.GET.get('_format')
    else:
        return None