What are the most useful curl opts you use regularly? or How do you optimize your requests with curl

16 Replies, 905 Views

Oh man, I’m all about `-L` for following redirects—so many APIs bounce you around, and this saves the hassle.

Also, `-w "\n%{http_code}\n"` is my jam for quickly checking status codes without all the noise.

For auth, I’ve got a dirty little secret: `-u user:pass` for basic auth, but I’ll often stash it in a bash alias to keep it out of my history.

If you’re tired of typing, check out Postman’s CLI tool `newman`—it’s like curl opts but with less memorization.

Messages In This Thread



Users browsing this thread: 1 Guest(s)