Http2 protocol and status messages

独自空忆成欢 提交于 2019-12-07 01:11:53

问题


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?


回答1:


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)



来源:https://stackoverflow.com/questions/36567489/http2-protocol-and-status-messages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!