mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Fix Pyload request content type headers (#74957)
This commit is contained in:
parent
6e1cd4c48a
commit
ed1545fab0
@ -4,7 +4,6 @@ from __future__ import annotations
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from aiohttp.hdrs import CONTENT_TYPE
|
||||
import requests
|
||||
import voluptuous as vol
|
||||
|
||||
@ -144,7 +143,7 @@ class PyLoadAPI:
|
||||
"""Initialize pyLoad API and set headers needed later."""
|
||||
self.api_url = api_url
|
||||
self.status = None
|
||||
self.headers = {CONTENT_TYPE: CONTENT_TYPE_JSON}
|
||||
self.headers = {"Content-Type": CONTENT_TYPE_JSON}
|
||||
|
||||
if username is not None and password is not None:
|
||||
self.payload = {"username": username, "password": password}
|
||||
|
Loading…
x
Reference in New Issue
Block a user