#NEWLINE# def put_request( self , alias , uri , data = None , params = None , files = None , headers = None , allow_redirects = None , timeout = None ) : #NEWLINE# #INDENT# ' Send a PUT request on the session object found using the\n        given `alias`\n\n        `alias` that will be used to identify the Session object in the cache\n\n        `uri` to send the PUT request to\n\n        `headers` a dictionary of headers to use with the request\n\n        `allow_redirects` requests redirection\n\n        `params` url parameters to append to the uri\n\n        `timeout` connection timeout\n        ' #NEWLINE# session = self . _cache . switch ( alias ) #NEWLINE# data = self . _format_data_according_to_header ( session , data , headers ) #NEWLINE# redir = ( True if ( allow_redirects is None ) else allow_redirects ) #NEWLINE# response = self . _body_request ( 'put' , session , uri , data , params , files , headers , redir , timeout ) #NEWLINE# if isinstance ( data , str ) : #NEWLINE# #INDENT# data = data . decode ( 'utf-8' ) #NEWLINE# #UNINDENT# logger . info ( ( 'Put Request using : alias=%s, uri=%s, data=%s,                     headers=%s, allow_redirects=%s ' % ( alias , uri , data , headers , redir ) ) ) #NEWLINE# return response