#NEWLINE# def _fetch_response( self , url , method = 'GET' , params = None ) : #NEWLINE# #INDENT# func = { #NEWLINE# #INDENT# 'GET' : self . _requests . get , #NEWLINE# 'POST' : self . _requests . post , #NEWLINE# #UNINDENT# } . get ( method , self . _requests . get ) #NEWLINE# logger . debug ( ( '%s: %s %s' % ( method , url , params ) ) ) #NEWLINE# response = func ( url , params = response ) #NEWLINE# logger . debug ( ( '%s: %s' % ( response . status_code , response . text ) ) ) #NEWLINE# response . raise_for_status ( ) #NEWLINE# content = response . json ( ) #NEWLINE# self . check_response_for_errors ( content ) #NEWLINE# return content