本文介绍了python请求是否支持HTTP2和异步调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在服务器中使用python-requests向苹果推送服务器发送PUSH通知,我的问题:
I would like to use python-requests in my server to send PUSH notification to Apple push server, my questions:
- python请求是否支持异步调用?
- python-request是否支持HTTP2?
谢谢
推荐答案
为,您应该考虑使用 HTTPX ( https://github.com/encode/httpx/).
As recommended by @qris in this comment, you should consider using HTTPX (https://github.com/encode/httpx/) .
它处于测试阶段,但计划于2021年发布1.0版.
It's in beta, but a 1.0 release in planned for 2021.
它同时支持异步和HTTP/2,并提供与请求兼容的API.
It supports both async as well as HTTP/2 and provides a requests-compatible API.
这篇关于python请求是否支持HTTP2和异步调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!