mirror of
https://github.com/home-assistant/core.git
synced 2025-06-05 05:37:04 +00:00
Don't set headers kwargs multiple times (#72779)
This commit is contained in:
parent
a54a5b2d20
commit
647df29a00
@ -493,13 +493,13 @@ async def async_oauth2_request(
|
||||
This method will not refresh tokens. Use OAuth2 session for that.
|
||||
"""
|
||||
session = async_get_clientsession(hass)
|
||||
|
||||
headers = kwargs.pop("headers", {})
|
||||
return await session.request(
|
||||
method,
|
||||
url,
|
||||
**kwargs,
|
||||
headers={
|
||||
**(kwargs.get("headers") or {}),
|
||||
**headers,
|
||||
"authorization": f"Bearer {token['access_token']}",
|
||||
},
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user