2

This blog post shows that you can show timing details, e.g:

$ curl -w "@curl_format.txt" -o /dev/null -s https://jsonplaceholder.typicode.com/comments
     time_namelookup:  0.001478s
        time_connect:  0.010429s
     time_appconnect:  0.028095s
    time_pretransfer:  0.028209s
       time_redirect:  0.000000s
  time_starttransfer:  0.046213s
                     ----------
          time_total:  0.065945s

I think HTTPie is more user friendly, though. Is there a way to achieve similar thing on HTTPie?

anta40
  • 6,511
  • 7
  • 46
  • 73

2 Answers2

2

HTTPie 3.0.0 has it: https://httpie.io/docs/cli/response-meta

$ http google.com --meta
Elapsed time: 0.080979083s

You can upgrade via:

pip install httpie --upgrade

(depending on your system, you might need sudo in front of the command ... and it might be pip3 on your system)

Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
1

Actually, that is the most awaited feature, see issue #243. It is not yet available as of HTTPie 2.6.0.

Tiger-222
  • 6,677
  • 3
  • 47
  • 60