(self, method, url, **kwargs)
Send a HTTP request, and catch any exception that might occur due to connection problems.
        Safe mode has been removed from requests 1.x.
Send a HTTP request, and catch any exception that might occur due to connection problems.
        Safe mode has been removed from requests 1.x.
Send a HTTP request and catch any exception that might occur due to connection problems . Safe mode has been removed from requests 1 . x .
def _send_request_safe_mode(self, method, url, **kwargs):
        """
        Send a HTTP request, and catch any exception that might occur due to connection problems.
        Safe mode has been removed from requests 1.x.
        """
        try:
            return requests.Session.request(self, method, url, **kwargs)
        except (MissingSchema, InvalidSchema, InvalidURL):
            raise
        except RequestException as ex:
            resp = ApiResponse()
            resp.error = ex
            resp.status_code = 0  # with this status_code, content returns None
            resp.request = Request(method, url).prepare()
            return resp
def _send_request_safe_mode ( self , method , url , * * kwargs ) : try : return requests . Session . request ( self , method , url , * * kwargs ) except ( MissingSchema , InvalidSchema , InvalidURL ) : raise except RequestException as ex : resp = ApiResponse ( ) resp . error = ex resp . status_code = 0 # with this status_code, content returns None resp . request = Request ( method , url ) . prepare ( ) return resp