#NEWLINE# def can_handle_pagination( self , query_url , query_fields ) : #NEWLINE# #INDENT# check_args = { #NEWLINE# #INDENT# 'resultOffset' : 0 , #NEWLINE# 'resultRecordCount' : 1 , #NEWLINE# 'where' : '1=1' , #NEWLINE# 'returnGeometry' : 'false' , #NEWLINE# 'outFields' : ',' . join ( query_fields ) , #NEWLINE# 'f' : 'json' , #NEWLINE# #UNINDENT# } #NEWLINE# response = request ( 'POST' , query_url , headers = self . headers , data = check_args ) #NEWLINE# try : #NEWLINE# #INDENT# data = response . json ( ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# _L . error ( 'Could not parse response from pagination check {} as JSON:\n\n{}' . format ( response . request . url , check_args . text ) ) #NEWLINE# return False #NEWLINE# #UNINDENT# return ( data . get ( 'error' ) and ( data [ 'error' ] [ 'message' ] != 'Failed to execute query.' ) )