li-shengang / ahttp Goto Github PK
View Code? Open in Web Editor NEWThe Fastest Speed Asynchronous HTTP Requests
The Fastest Speed Asynchronous HTTP Requests
在请求多个url时会遇到concurrent.futures._base.TimeoutError
#from aiohttp.helpers import deprecated_noop
可以加一个获取接口响应时间的属性吗,想用这个模块做个压测平台,需要知道接口的响应时间
对于aiohttp的请求好像没有设置重连次数的方法或参数
单个请求
使用是非常简单的:
import ahttp
url = "http://httpbin.org/headers"
构造一个get请求对象:
req = ahttp.get(url)
执行请求:
res = res.run()
打印出请求得到的文本:
print(res.text)
特别是res = res.run()这很明显的报错啊
c:\users\users\appdata\local\programs\python\python36-32\lib\site-packages\ahttp.py in ()
10 from random import random
11 import asyncio, os
---> 12 from aiohttp.helpers import deprecated_noop
13 from cchardet import detect
14 try:
ImportError: cannot import name 'deprecated_noop'
callback与max_try好像没效果,
报TypeError: _request() got an unexpected keyword argument 'max_try'
TypeError: _request() got an unexpected keyword argument 'callable'
异常
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.