Httpie: Is there a way to paginate the output while keeping colors and formatting?

Created on 13 Nov 2015  ·  3Comments  ·  Source: httpie/httpie

I have certain HTTP calls the provide a huge response, and fill up quite a few monitor spaces. And in those calls, the most relevant information is at the beginning of the response, so I want to read that first.

So I have to page up quite a few times (or use reverse search in terminal). I rather just view the response on a page-by-page-approach starting from the top.

I tried piping the output of httpie into less and most, yet thereby I lose both colors and formatting.

Is there a way to get paginated output?

question

Most helpful comment

Nice, I figured it out on my own. Hitting the manual does help:

http --pretty=all POST YOUR_ENDPOINT < data.json | less -r

All 3 comments

Nice, I figured it out on my own. Hitting the manual does help:

http --pretty=all POST YOUR_ENDPOINT < data.json | less -r

http --pretty=all get https://google.com | less does it! 😄

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jclem picture jclem  ·  6Comments

maciej picture maciej  ·  4Comments

Abdallah-Obaid picture Abdallah-Obaid  ·  4Comments

eliangcs picture eliangcs  ·  5Comments

cunde picture cunde  ·  7Comments