Fix Pyload request content type headers (#74957)
This commit is contained in:
parent
6e1cd4c48a
commit
ed1545fab0
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue