kopia lustrzana https://github.com/micropython/micropython-lib
requests: Added support for some non-standard URLs
rodzic
e025c843b6
commit
27e00b6274
|
@ -68,6 +68,14 @@ def request(
|
||||||
port = 443
|
port = 443
|
||||||
else:
|
else:
|
||||||
raise ValueError("Unsupported protocol: " + proto)
|
raise ValueError("Unsupported protocol: " + proto)
|
||||||
|
|
||||||
|
if "?" in host:
|
||||||
|
host, _path = host.split("?", 1)
|
||||||
|
path = "?" + _path + path
|
||||||
|
|
||||||
|
if "#" in host:
|
||||||
|
host, _path = host.split("#", 1)
|
||||||
|
path = "#" + _path + path
|
||||||
|
|
||||||
if ":" in host:
|
if ":" in host:
|
||||||
host, port = host.split(":", 1)
|
host, port = host.split(":", 1)
|
||||||
|
|
Ładowanie…
Reference in New Issue