I'm trying to update my APNS provider server to use the new HTTP/2 API. I've got the TLS1.2 connection establishing fine, but I'm having difficulties getting a valid response from the server. I think this may be because the HTTP client library I'm using doesn't support the new HTTP/2 protocol. Is the new API HTTP/2 only as in it is not backwards compatible with HTTP/1.1? Is is possible to still send the POST request with an HTTP/1.1 library? I thought I've read that HTTP/2 should be backwards compatible.
Any help appreciated,
Jonathan
Jonathan,
I think the idea with HTTP backward-compatibility is that clients and servers can have a conversation that goes something like this:
Both support HTTP/2?
Client: "Hello!"
Server: "Hello!"
Client: "Do you speak HTTP/2?"
Server: "Yes, I do! Let's start using HTTP/2 now."
Server doesn't support HTTP/2:
Client: "Hello!"
Server: "Hello!"
Client: "Do you speak HTTP/2?"
Server: "What?"
Client: "Never mind. Let's keep using HTTP 1."
That doesn't mean the protocols themselves are interchangeable, though. In fact, HTTP/2 is quite different than HTTP/1. To the best of my knowledge (I'm the author of Pushy, a push notification provider that uses HTTP/2), the new HTTP/2-based APNs protocol ONLY speaks HTTP/2, and won't support HTTP/1 at all.