def clone_request(request, method):
 ret = Request(request=request._request, parsers=request.parsers, authenticators=request.authenticators, negotiator=request.negotiator, parser_context=request.parser_context)
 ret._data = request._data
 ret._files = request._files
 ret._content_type = request._content_type
 ret._stream = request._stream
 ret._method = method
 if hasattr(request, '_user'):
  ret._user = request._user
 if hasattr(request, '_auth'):
  ret._auth = request._auth
 if hasattr(request, '_authenticator'):
  ret._authenticator = request._authenticator
 return ret

def clone_request ( request , method ) : ret = Request ( request = request . _request , parsers = request . parsers , authenticators = request . authenticators , negotiator = request . negotiator , parser_context = request . parser_context ) ret . _data = request . _data ret . _files = request . _files ret . _content_type = request . _content_type ret . _stream = request . _stream ret . _method = method if hasattr ( request , '_user' ) : ret . _user = request . _user if hasattr ( request , '_auth' ) : ret . _auth = request . _auth if hasattr ( request , '_authenticator' ) : ret . _authenticator = request . _authenticator return ret
internal helper method to clone a request .