enhance: add gzip

pull/9184/head
Yeuoly 2 years ago
parent fb3a701c86
commit 1907d791e1
No known key found for this signature in database
GPG Key ID: A66E7E320FB19F61

@ -31,6 +31,7 @@ class BasePluginManager:
url = URL(str(plugin_daemon_inner_api_baseurl)) / path
headers = headers or {}
headers["X-Api-Key"] = plugin_daemon_inner_api_key
headers["Accept-Encoding"] = "gzip, deflate, br"
if headers.get("Content-Type") == "application/json" and isinstance(data, dict):
data = json.dumps(data)

Loading…
Cancel
Save