def _request(self, location="", method="GET", body=None):
        headers = {
            "Accept": "*/*",
            "Authorization": self._auth_header,
            #"Accept-Encoding":"*",
        }

        if self._scheme is "https":
            connection = httplib.HTTPSConnection(self._host)
        else:
            connection = httplib.HTTPConnection(self._host)
        connection.request(method, location, body=body, headers=headers)
        response = connection.getresponse()
        text = response.read()
        connection.close()
        if response.status < 200 or response.status >= 400:
            # Response was not successful (status 2xx or 3xx).
            raise ServerError("Status returned from OpenNebula was %s." % response.status)

        try:
            return parseString(text)
        except ExpatError as e:
            raise ParsingError('This xml could not be parsed: """%s"""' % text, e)

    ##### Images #####
Return the contents of an object as a dict.
dataset/ETHPy150Open bmbouter/Opus/opus/lib/prov/drivers/opennebula14.py/OpenNebula14Driver._request--crossover with--dataset/ETHPy150Open JoelBender/bacpypes/py27/bacpypes/bvll.py/Result.bvlpdu_contents