Sunday, 17 September 2017

Getting only response header from HTTP POST using curl

One can request only the headers using HTTP HEAD, as option -I in curl(1).




$ curl -I /


Lengthy HTML response bodies are a pain to get in command-line, so I'd like to get only the header as feedback for my POST requests. However, HEAD and POST are two different methods.



How do I get curl to display only response headers to a POST request?

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...