encode/httpx

407 Proxy Authentication Required

yuqiuwen opened this issue · 0 comments

httpx.ProxyError: 407 Proxy Authentication Required. However, its no problem in requests

_proxy_meta = "http://%(user)s:%(pass)s@%(host)s:%(port)s" % {
        "user": "xxx",
        "pass": "xxx",
        "host": "xxx",
        "port": xxx
}

headers["Proxy-Authorization"] = f"sign={sign}&orderno={orderno}&timestamp={ts}&change=true"
proxies = {"http://": _proxy_meta, "https://": _proxy_meta}
r = httpx.get(url, headers=headers, proxies=proxies, verify=False)