我现在拥有(Python 3.4):
r = yield from aiohttp.request('post', URL, params=None, data=values, headers=headers)
documentation中的内容:
conn = aiohttp.ProxyConnector(proxy="http://some.proxy.com")
r = await aiohttp.get('http://python.org', connector=conn)
那么,我应该如何通过与aiohttp的代理连接发送带有标题的帖子请求?
感谢。
答案 0 :(得分:3)
java.properties
答案 1 :(得分:1)
你可以用这个:
import aiohttp
conn = aiohttp.ProxyConnector(proxy="http://some.proxy.com")
r = await aiohttp.post('http://python.org', connector=conn, data=b"hello", headers={})
或
import aiohttp
from aiohttp import request
conn = aiohttp.ProxyConnector(proxy="http://some.proxy.com")
r = await request('post','http://python.org', connector=conn, data=b"hello", headers={})