Encode requests POST as UTF-8 if it has no encoding/basic string #1315 #2309

post-request-encoding
dgtlmoon 6 months ago
parent d7e85ffe8f
commit 1813977133

@ -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,

Loading…
Cancel
Save