How to Use curl to Print the Location Header in a Response?

18 Replies, 793 Views

Hey, that’s a clever way to curl print location header! I usually use `-I` and `grep` like others mentioned, but your method is way more elegant for scripting.

One edge case: some servers don’t include the location header in the first response. In those cases, `-L` is a must.

Messages In This Thread



Users browsing this thread: 1 Guest(s)