pyhttpx
pyhttpx copied to clipboard
stream模式的支持
经常遇到需要下载文件,如果不支持stream模式,经常下载会卡住,请问可以添加支持吗?
先用第三方超时函数装饰处理吧
Zhujin Liang @.***> 于2023年8月16日周三 17:19写道:
经常遇到需要下载文件,如果不支持stream模式,经常下载会卡住,请问可以添加支持吗?
— Reply to this email directly, view it on GitHub https://github.com/zero3301/pyhttpx/issues/26, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ53XMMR4AS2VSEA4ZJXMB3XVSGB7ANCNFSM6AAAAAA3SHJHNE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
请问有什么推荐吗?
from timeout_decorator import timeout @timeout(seconds=5) def some_function(): pass
这样会导致一直下载不了,可能最好的方式是支持requests的stream模式