

def make_duplicate_request(request):
    '\n    Since werkzeug request objects are immutable, this is needed to create an\n    identical reuet object with immutable values so it can be retried after a\n    POST failure.\n    '

    class FakeRequest(object):
        method = 'GET'
        path = request.path
        headers = request.headers
        GET = request.GET
        POST = request.POST
        user = getattr(request, 'user', None)
        cookies = request.cookies
        is_xhr = request.is_xhr
    return FakeRequest()

dataset/ETHPy150Open priestc/giotto/giotto/controllers/http.py make_duplicate_request/original