Open jkbrzt opened 9 years ago
Arguably the more important fact is that the notion of a 'request line' doesn't exist in HTTP/2. Instead there are pseudo-headers: :method
, :scheme
, :authority
, and :path
.
I wonder what cURL does. That feels like the correct model to follow.
I the same. return 1.1
➜ tools git:(master) ✗ http https://nghttp2.org/httpbin/get
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Connection: close
Content-Length: 256
Content-Type: application/json
Date: Tue, 16 May 2017 08:41:55 GMT
Server: nghttpx
Strict-Transport-Security: max-age=31536000
Via: 1.1 nghttpx
X-Backend-Header-Rtt: 0.002316
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
{
"args": {},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Host": "nghttp2.org",
"User-Agent": "HTTPie/0.9.9",
"Via": "1.1 nghttpx"
},
"origin": "120.92.8.170",
"url": "https://nghttp2.org/httpbin/get"
}
It's hardcoded in HTTPie. Unclear how to obtain the actual version.