question background:
recently I want to use springboot2.0 to build a server that supports http2.0. After setting up, through Chrome access, it shows that the version of http protocol is H2 (the server has been upgraded successfully and the certificate has been configured successfully).
okhttp3http2.0responseprotocolhttp1.1
:
1.springboot:
2.EchoController:ECHO
3.:
:
response:
Response{protocol=http/1.1, code=200, message=OK, url=https://localhost:8080/echo}
build request:
ConnectionUpgrade HTTP/1.1 . HTTP/2 h2c, HTTP/2 ClearText.
:
ECHO!!
HTTP_1_1
@Feng_YuStackOverflowbuild okHttpClienth2
http1.1debugclientbuildh2
I can"t handle it. I"ll give you some advice on how to make it. Let him fall in the ice. No, no, no.
you can also give some advice from all kinds of gods!