async def _query(
        self,
        path,
        method="GET",
        *,
        params=None,
        data=None,
        headers=None,
        timeout=None,
        chunked=None
    ):
        """
        Get the response object by performing the HTTP request.
        The caller is responsible to finalize the response object.
        """
        url = self._canonicalize_url(path)
        if headers and "content-type" not in headers:
            headers["content-type"] = "application/json"
        try:
            response = await self.session.request(
                method,
                url,
                params=httpize(params),
                headers=headers,
                data=data,
                timeout=timeout,
                chunked=chunked,
            )
        except asyncio.TimeoutError:
            raise
        if (response.status // 100) in [4, 5]:
            what = await response.read()
            content_type = response.headers.get("content-type", "")
            response.close()
            if content_type == "application/json":
                raise DockerError(response.status, json.loads(what.decode("utf8")))
            else:
                raise DockerError(response.status, {"message": what.decode("utf8")})
        return response
Get the response object by performing the HTTP request.
        The caller is responsible to finalize the response object.