

def _request(self, method, uri, headers={
    
}, body='', stream=False):
    '\n        Given a Method, URL, Headers, and Body, perform and HTTP\n        request, and return a 3-tuple containing the response status,\n        response headers (as httplib.HTTPMessage), and response body.\n        '
    response = None
    headers.setdefault('Accept', 'multipart/mixed, application/json, */*;q=0.5')
    if self._client._credentials:
        self._security_auth_headers(self._client._credentials.username, self._client._credentials.password, headers)
    try:
        self._connection.request(method, uri, body, headers)
        response = self._connection.getresponse()
        if stream:
            response_body = response
        else:
            response_body = response.read()
    finally:
        if (response and (not stream)):
            response.close()
    return (response.status, response.msg, response_body)

dataset/ETHPy150Open basho/riak-python-client/riak/transports/http/connection.py HttpConnection._request/original