What’s the Best curl Option to Handle Redirects? or How Do You Use the --data curl Option for POST Re

18 Replies, 821 Views

`-L` is your best bet, but if it’s not working, check the response codes with `-I` (HEAD request). Maybe the server’s returning 301 vs 302 weirdly?

Also, `--stderr -` can help capture verbose output for scripting.

If all else fails, `httrack` is a nuclear option for following redirects, but it’s overkill for most cases.

Messages In This Thread



Users browsing this thread: 1 Guest(s)