diff --git a/changedetectionio/content_fetchers/requests.py b/changedetectionio/content_fetchers/requests.py index 5e984c5e..2e952c9c 100644 --- a/changedetectionio/content_fetchers/requests.py +++ b/changedetectionio/content_fetchers/requests.py @@ -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, diff --git a/changedetectionio/notification.py b/changedetectionio/notification.py index 97061994..d685ab1d 100644 --- a/changedetectionio/notification.py +++ b/changedetectionio/notification.py @@ -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 )