Encode POST style requests and notifications as UTF-8 if it has no encoding/basic string (#2523)

notification-utf8-test
dgtlmoon 2024-07-27 14:27:15 +02:00 zatwierdzone przez GitHub
rodzic d7e85ffe8f
commit 2fd762a783
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -53,7 +53,7 @@ class fetcher(Fetcher):
session.mount('file://', FileAdapter())
r = session.request(method=request_method,
data=request_body,
data=request_body.encode('utf-8') if type(request_body) is str else request_body,
url=url,
headers=request_headers,
timeout=timeout,

Wyświetl plik

@ -107,7 +107,7 @@ def apprise_custom_api_call_wrapper(body, title, notify_type, *args, **kwargs):
r(results.get('url'),
auth=auth,
data=body,
data=body.encode('utf-8') if type(body) is str else body,
headers=headers,
params=params
)