So i just found out the hard way that the http2 protocol does not support http status messages like 404 Not Found in the old http1.1 protocol. One of our web Api's is using the http status message to return a readable message to the end user.
Now my question is, is there a new way of returning status messages in http2 or do we have to return the message in the http response body?
Google Chrome offers a quick and easy way to check if HTTP/2 is supported on your SSL-enabled site. First, visit your site in Chrome over HTTPS. There you'll see your site listed with protocol h2, confirming your site works over HTTP/2.
The primary goals for HTTP/2 are to reduce latency by enabling full request and response multiplexing, minimize protocol overhead via efficient compression of HTTP header fields, and add support for request prioritization and server push.
Some key features of HTTP/2 include: Binary: Meaning commands use 1s and 0s and not text. Multiplex: Permits multiple requests and responses to be sent at the same time. Compression: Compresses headers that have been requested previously to make things more efficient.
There is no new standard way, thus either a custom response header or the message body are your only choices.
(For the record: I argued against this change)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With