Ok I think I got the answer. If I print out the response headers I got this:
OkHttp-Selected-Protocol: h2
Am I to assume it negotiated successfully the response for http/2?
Thanks!
-tony
1
Shubham Chaudhary
On
FYI since okhttp 3.0 or so OkHttp-Selected-Protocol is not printed.
The protocol can be easily seen in the response object though.
0
Firzen
On
You can check protocol by calling:
Response response = client.newCall(request).execute(); // first get response from server
Protocol protocol = response.protocol(); // check which protocol was used
Ok I think I got the answer. If I print out the response headers I got this: OkHttp-Selected-Protocol: h2
Am I to assume it negotiated successfully the response for http/2?
Thanks! -tony