This question, as you may have deduced from the title, actually consists of two questions.
First question: Should I use HTTP / 2.0 to send Apple Push notifications?
In the Apple API API APNs documentation, the opening paragraphs indicate:
The API provider is based on the HTTP / 2 network protocol.
There are several other links to HTTP / 2.0 throughout the documentation. However, I do not see (which does not mean that it does not exist) nothing indicating that HTTP / 2.0 should be used. Does this mean that I am allowed to use any HTTP version? Or am I actually limited to HTTP / 2.0?
I am very familiar with HTTP / 1.1, but I know almost nothing about HTTP / 2.0, so if I can use my old familiar protocol, I would prefer that.
Second question (based on the first question): Is it possible to use libcurl with APN?
This question only matters with an affirmative answer to the first question. If it is not, that I should use HTTP / 2.0 with APN, then I already know that I can use libcurl.
I will send a lot of APNs from an already loaded server, and I would prefer to do it initially - so I plan to use libcurl if possible. However, I understand that libcurl is somewhat limited when it comes to HTTP / 2.0.
The main problem is that when libcurl creates an HTTP / 2.0 connection, it actually starts with an HTTP / 1.1 request that includes the upgrade header and then waits for the 101 Switching Protocols status bar 101 Switching Protocols . Is this behavior supported by APN? Or should I try using something like nghttp2 ?
I found that nghttp2 is somewhat complex and very poorly documented at the moment. I'm worried that if I can't use libcurl, I may need to implement HTTP / 2.0 myself using sockets (which will be THE WORST).
Any help is appreciated on any issue! Thanks everyone!