'When being redirected we may want to change the method of the request
based on certain specs or browser behavior.'

def rebuild_method(self, prepared_request, response):

    method = prepared_request.method
    if ((response.status_code == codes.see_other) and (method != 'HEAD')):
        method = 'GET'
    if ((response.status_code == codes.found) and (method != 'HEAD')):
        method = 'GET'
    if ((response.status_code == codes.moved) and (method == 'POST')):
        method = 'GET'
    prepared_request.method = method
