def METHOD_NAME(urllib_req, request_body, mocker):
    req_mock = mocker.patch('ansible.module_utils.urls.RequestWithMethod')
    handler = RedirectHandlerFactory('all', False)
    inst = handler()
    inst.redirect_request(urllib_req, request_body, 301, '301 Moved Permanently', {}, 'https://docs.ansible.com/foo bar')
    req_mock.assert_called_once_with('https://docs.ansible.com/foo%20bar', data=None, headers={}, method='GET', origin_req_host='ansible.com',
                                     unverifiable=True)