Closed fendouai closed 7 years ago
@fendouai If you call type()
on the response object you're holding, that will give you the object, which will be either a HTTP20Response
or a HTTP11Response
. That is enough to know the version.
However, I think we should add a feature that lets you consult a flag.
Thank you. And I think the flag which shows the version of the http is important.
Would you like to help contribute a patch for this @fendouai? If not, I'd be willing to pick this up.
I am trying to find the version. I am not familiar with the project yet.If I have a solution,I will try to contribute a patch for this.
@Lukasa I've had this sitting for a while (9286249). If we still want it, I can open the PR. I wasn't sure if standard practice was truncating ".0" from HTTP/2 or if we even wanted "HTTP" in the version flag.
I actually strongly recommend using the enum
module and then using an enum
to flag this. Let's pretend we're real programmers. ;)
Resolved by #296.
I can not get the http version from headers,how to get the http version when i use http2.