#NEWLINE# def _send( self , method , path , expected_code , **kwargs ) : #NEWLINE# #INDENT# url = self . _get_url ( url ) #NEWLINE# response = self . session . request ( method , url , allow_redirects = False , ** kwargs ) #NEWLINE# if ( ( isinstance ( expected_code , Number ) and ( response . status_code != expected_code ) ) or ( ( not isinstance ( expected_code , Number ) ) and ( response . status_code not in expected_code ) ) ) : #NEWLINE# #INDENT# raise OperationFailed ( method , path , expected_code , response . status_code ) #NEWLINE# #UNINDENT# return response