Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does python-requests support HTTP2 and asynchronous calls?

I would like to use python-requests in my server to send PUSH notification to Apple push server, my questions:

  1. Does python-requests support asynchronous calls ?
  2. Does python-request support HTTP2 ?

Thanks

like image 614
Thomas Young Avatar asked Jul 05 '17 16:07

Thomas Young


1 Answers

As recommended by @qris in this comment, you should consider using HTTPX (https://github.com/encode/httpx/) .

It's in beta, but a 1.0 release is planned.

It supports both async as well as HTTP/2 and provides a requests-compatible API.

like image 68
Greg Dubicki Avatar answered Dec 16 '22 12:12

Greg Dubicki