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

18 Replies, 1118 Views

Hey! `-L` is the right curl option, but sometimes servers do weird things like infinite redirects. Try `--max-redirs 5` to cap it.

Also, if you’re using cookies, `-L` might not carry them over properly. Add `-b` and `-c` flags to manage cookies manually.

For a visual tool, check out HTTPie—it’s like curl but prettier and handles redirects well.

Messages In This Thread



Users browsing this thread: 1 Guest(s)