def execute_query(self):
     """Submit pending request to the server"""
     for request in self._build_request():
         try:
             response = self.execute_request_direct(request)
             response.raise_for_status()
             self.process_response(response)
         except HTTPError as e:
             raise ClientRequestException(*e.args, response=e.response)
     self.clear()
Ejemplo n.º 2
0
 def execute_query(self):
     """Submit a pending request to the server"""
     try:
         request = self.build_request()
         self.beforeExecute.notify(request)
         response = self.execute_request_direct(request)
         response.raise_for_status()
         self.process_response(response)
         self.afterExecute.notify(response)
     except HTTPError as e:
         raise ClientRequestException(*e.args, response=e.response)
Ejemplo n.º 3
0
 def validate_response(self, response):
     try:
         response.raise_for_status()
     except HTTPError as e:
         raise ClientRequestException(*e.args, response=e.response)