#NEWLINE# def make_request( self , action , body = '' , callback = None , object_hook = None ) : #NEWLINE# #INDENT# 'Make an asynchronous HTTP request to DynamoDB. Callback should\n    operate on the decoded json response (with object hook applied, of\n    course). It should also accept an error argument, which will be a\n    boto.exception.DynamoDBResponseError.\n\n    If there is not a valid session token, this method will ensure\n    that a new one is fetched and cache the request when it is\n    retrieved.\n    ' #NEWLINE# this_request = functools . partial ( self . make_request , action = action , body = body , callback = callback , object_hook = object_hook ) #NEWLINE# if ( self . authenticate_requests and ( self . provider . security_token in [ None , PENDING_SESSION_TOKEN_UPDATE ] ) ) : #NEWLINE# #INDENT# self . pending_requests . appendleft ( this_request ) #NEWLINE# def cb_for_update( error = None ) : #NEWLINE# #INDENT# if error : #NEWLINE# #INDENT# raise DynamoDBResponseError ( error . status , error . reason , body = { #NEWLINE# #INDENT# 'message' : error . body , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# #UNINDENT# self . _update_session_token ( cb_for_update ) #NEWLINE# return #NEWLINE# #UNINDENT# headers = { #NEWLINE# #INDENT# 'X-Amz-Target' : ( '%s_%s.%s' % ( self . ServiceName , self . Version , action ) ) , #NEWLINE# 'Content-Type' : 'application/x-amz-json-1.0' , #NEWLINE# 'Content-Length' : str ( len ( body ) ) , #NEWLINE# #UNINDENT# } #NEWLINE# request = HTTPRequest ( ( 'https://%s' % self . host ) , method = 'POST' , headers = headers , body = body , validate_cert = self . validate_cert ) #NEWLINE# request . path = '/' #NEWLINE# if self . authenticate_requests : #NEWLINE# #INDENT# self . _auth_handler . add_auth ( request ) #NEWLINE# #UNINDENT# http_client = httpclient . AsyncHTTPClient ( ) #NEWLINE# http_client . fetch ( self , functools . partial ( self . _finish_make_request , callback = callback , orig_request = this_request , token_used = self . provider . security_token , object_hook = object_hook ) )