mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
fix
This commit is contained in:
parent
a913314951
commit
ccc9455408
@ -185,7 +185,9 @@ class Requester_common:
|
||||
dataptr = (dataptr).encode("utf8")
|
||||
datalen = len(dataptr)
|
||||
# print('dataptr',dataptr)
|
||||
if "Content-Type" not in headers:
|
||||
if isinstance(data, (str, bytes)):
|
||||
pass
|
||||
elif "Content-Type" not in headers:
|
||||
headers["Content-Type"] = "application/x-www-form-urlencoded"
|
||||
elif js:
|
||||
dataptr = json.dumps(js).encode("utf8")
|
||||
|
Loading…
x
Reference in New Issue
Block a user