diff --git a/pyIndego/indego_async_client.py b/pyIndego/indego_async_client.py index 3b4ee28..5aa4834 100644 --- a/pyIndego/indego_async_client.py +++ b/pyIndego/indego_async_client.py @@ -495,6 +495,9 @@ async def _request( # noqa: C901 headers["Authorization"] = "Bearer %s" % self._token try: + log_headers = headers.copy() + if 'Authorization' in log_headers: + log_headers['Authorization'] = '******' _LOGGER.debug( "%s call to API endpoint %s, headers: %s, data: %s", method.value, @@ -502,6 +505,7 @@ async def _request( # noqa: C901 json.dumps(headers) if headers is not None else '', json.dumps(data) if data is not None else '', ) + async with self._session.request( method=method.value, url=url,