You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default httpx.Client provided by homeassistant.helpers.httpx_client.get_async_client() persists cookies and there is currently no way of turning it off. I'm not sure if this is intentional or if we're just using the httpx default behaviour. In any case, I'm not sure this is what component developers are expecting in general.
There are several ways to address this:
Do nothing and accept free cookies for all. Components that really need no cookies uses create_async_httpx_client() to create their own client.
Add an optional parameter to get_async_client() returning a client without cookies. This would result in 4 shared clients, with or without verify and with or without cookies instead of the current 2.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The default
httpx.Client
provided byhomeassistant.helpers.httpx_client.get_async_client()
persists cookies and there is currently no way of turning it off. I'm not sure if this is intentional or if we're just using the httpx default behaviour. In any case, I'm not sure this is what component developers are expecting in general.There are several ways to address this:
create_async_httpx_client()
to create their own client.get_async_client()
returning a client without cookies. This would result in 4 shared clients, with or without verify and with or without cookies instead of the current 2.Please advise.
Beta Was this translation helpful? Give feedback.
All reactions