#NEWLINE# def _post( self , url , params ) : #NEWLINE# #INDENT# common . logger . debug ( ( 'POST to %s with params %s' % ( url , str ( params ) ) ) ) #NEWLINE# with self . __lock : #NEWLINE# #INDENT# ( data , headers ) = self . _buildQuery ( params ) #NEWLINE# response = requests . post ( url , headers = headers , data = data , timeout = HTTPClient . REQUEST_TIMEOUT ) #NEWLINE# response . raise_for_status ( ) #NEWLINE# #UNINDENT# jsonResponse = response . json ( ) #NEWLINE# if isinstance ( jsonResponse , dict ) : #NEWLINE# #INDENT# error = jsonResponse . get ( 'error' ) #NEWLINE# if ( error is not None ) : #NEWLINE# #INDENT# raise Exception ( error ) #NEWLINE# #UNINDENT# #UNINDENT# return jsonResponse