httpie-http2 icon indicating copy to clipboard operation
httpie-http2 copied to clipboard

Doesn't print HTTP headers

Open alanorth opened this issue 9 years ago • 9 comments

With Python 3.4.3, on Mac OS X:

$ http --print Hh https://nghttp2.org/httpbin/get     
GET /httpbin/get HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: nghttp2.org
User-Agent: HTTPie/0.9.2

HTTP/2 200

But the headers are shown using vanilla httpie:

$ http --print Hh https://nghttp2.org/httpbin/get     
GET /httpbin/get HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: nghttp2.org
User-Agent: HTTPie/0.9.2

HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Connection: close
Content-Length: 258
Content-Type: application/json
Date: Sun, 27 Sep 2015 12:04:37 GMT
Server: nghttpx nghttp2/1.3.5-DEV
Strict-Transport-Security: max-age=31536000
Via: 1.1 nghttpx
X-Backend-Header-Rtt: 0.002355

alanorth avatar Sep 27 '15 12:09 alanorth

I have same problem with Python 2.7.11.

It's printing only HTTP/2 version along with status code.

$ http https://nghttp2.org/httpbin/get
HTTP/2 200

svagi avatar Feb 18 '16 15:02 svagi

Got the same result here. Thinking this package is outdated (even though created by the creator of HTTPie itself)

itsnotvalid avatar May 24 '16 06:05 itsnotvalid

It's very hard to use httpie without headers being shown. Any plans to introduce support for this?

theirix avatar May 26 '17 07:05 theirix

Also, this package seems to remove syntax highlighting from the response body.

glyph avatar Jul 02 '17 01:07 glyph

Any idea if response headers will show up in http/2?

dhilipvenkatesh avatar Jul 19 '18 22:07 dhilipvenkatesh

any updates...?

inductor avatar Aug 06 '18 03:08 inductor

Same problem. With plugin only print "HTTP/2 200" and also loose all colors in a GET mode.

alex-left avatar Jan 30 '19 12:01 alex-left

Hi, @jakubroztocil, could you please look into this ? Without headers it's quite useless...

verglor avatar Feb 10 '19 17:02 verglor

https://github.com/jakubroztocil/httpie/issues/692#issuecomment-646354697

jkbrzt avatar Jun 18 '20 23:06 jkbrzt