tempest/services/object_storage/account_client.py
def request(self, method, url, headers=None, body=None):
        """A simple HTTP request interface."""
        self.http_obj = http.ClosingHttp()
        if headers is None:
            headers = {}
        if self.base_url is None:
            self._set_auth()

        req_url = "%s/%s" % (self.base_url, url)

        self._log_request(method, req_url, headers, body)
        resp, resp_body = self.http_obj.request(req_url, method,
                                                headers=headers, body=body)
        self._log_response(resp, resp_body)

        if resp.status == 401 or resp.status == 403:
            raise exceptions.Unauthorized()

        return resp, resp_body
A simple HTTP request interface.
A simple HTTP request interface.
A simple HTTP request interface .
def request(self, method, url, headers=None, body=None):
        self.http_obj = http.ClosingHttp()
        if headers is None:
            headers = {}
        if self.base_url is None:
            self._set_auth()
        req_url = "%s/%s" % (self.base_url, url)
        self._log_request(method, req_url, headers, body)
        resp, resp_body = self.http_obj.request(req_url, method,
                                                headers=headers, body=body)
        self._log_response(resp, resp_body)
        if resp.status == 401 or resp.status == 403:
            raise exceptions.Unauthorized()
        return resp, resp_body
def request ( self , method , url , headers = None , body = None ) : self . http_obj = http . ClosingHttp ( ) if headers is None : headers = { } if self . base_url is None : self . _set_auth ( ) req_url = "%s/%s" % ( self . base_url , url ) self . _log_request ( method , req_url , headers , body ) resp , resp_body = self . http_obj . request ( req_url , method , headers = headers , body = body ) self . _log_response ( resp , resp_body ) if resp . status == 401 or resp . status == 403 : raise exceptions . Unauthorized ( ) return resp , resp_body
A simple HTTP request interface.
A simple HTTP request interface .
"""A simple HTTP request interface."""
self
method
url
headers
body