kopia lustrzana https://github.com/dgtlmoon/changedetection.io
Encode POST style requests and notifications as UTF-8 if it has no encoding/basic string (#2523)
rodzic
d7e85ffe8f
commit
2fd762a783
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
Ładowanie…
Reference in New Issue