当我尝试通过HTTPS代理发出请求时-
async with session.get(
url
headers={"k": v},
proxy='https://my-proxy.com:1234',
) as response:
resp_json = await response.json()
我的请求失败,但有以下例外:
raise ValueError("Only http proxies are supported")
这对应于source code。
但是,the docs说支持HTTPS代理。
这是文档中的疏忽还是我做错了?
[我在回购中打开了issue,Andrew Svetlov很友好地澄清了。 aiohttp
支持纯HTTP客户端和可以通过HTTP CONNECT升级到HTTPS的HTTP客户端。我做了一个pull request来更新文档。