python请求是否支持HTTP2和异步调用? [英] Does python-requests support HTTP2 and asynchronous calls?

查看:99
本文介绍了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:

  1. python请求是否支持异步调用?
  2. python-request是否支持HTTP2?

谢谢

推荐答案

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和异步调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆