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

18 Replies, 1085 Views

Yo, that’s a solid way to curl print location header! I usually just use `-I` to grab headers and grep for "Location," but your method is way cleaner for scripting.

Have you tried `jq` for parsing JSON responses? Sometimes APIs return redirects in JSON, and `jq` makes it easy to extract.

Messages In This Thread



Users browsing this thread: 1 Guest(s)