healthjoy / async-firebase

The lightweight asynchronous client that makes interaction with Firebase Cloud Messaging oversimplified.
MIT License
36 stars 14 forks source link

Http2 #85

Open cyberbudy opened 2 weeks ago

cyberbudy commented 2 weeks ago

Thanks for a great project

I have a question about your usage of httpx client. As I understand from FCM documentation, after upgrading to HTTPv1 API the recommended way to send batch messages is to use multiplexing via HTTP/2 protocol. To use it with httpx you need to install httpx[http2] and pass http2 flag to client

httpx.AsyncClient(http2=True)

otherwise it establishes connection with HTTP1.1(now it works such way)

So, my question is it was a design choice not to use http2(for some reasons) or just missed?

ndmytro commented 2 weeks ago

Thank you for your kind words about the project.

Regarding your question about the usage of the httpx client, at the time we started the project, HTTP/1.1 met our requirements and fit the plans we had in place. We did not initially incorporate HTTP/2, and we appreciate you bringing this to our attention.

We will certainly look into updating the implementation to utilize HTTP/2 as per the recommended approach for sending batch messages via the HTTPv1 API. Additionally, we always welcome contributions, so if you're interested in helping with this update or any other aspect of the project, it would be greatly appreciated.