def clean_request(request):
    """
    Strip the "method" variable from the GET and POST params of a request.

    Args:
        request(HttpRequest): the request.

    Returns:
        HttpRequest: the modified request
    """
    # Save mutability of GET and POST
    get_mutable = request.GET._mutable
    post_mutable = request.POST._mutable

    # Make GET and POST mutable
    request.GET._mutable = True
    request.POST._mutable = True

    # Pop off the 'method' parameter
    request.GET.pop('method', None)
    request.POST.pop('method', None)

    # Restore mutability
    request.GET._mutable = get_mutable
    request.POST._mutable = post_mutable

    return request