mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-01 10:04:12 +08:00
fix
This commit is contained in:
parent
a913314951
commit
ccc9455408
@ -185,7 +185,9 @@ class Requester_common:
|
|||||||
dataptr = (dataptr).encode("utf8")
|
dataptr = (dataptr).encode("utf8")
|
||||||
datalen = len(dataptr)
|
datalen = len(dataptr)
|
||||||
# print('dataptr',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"
|
headers["Content-Type"] = "application/x-www-form-urlencoded"
|
||||||
elif js:
|
elif js:
|
||||||
dataptr = json.dumps(js).encode("utf8")
|
dataptr = json.dumps(js).encode("utf8")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user