4 ms·
I love curl and use it all the time (copying requests from the browser is maybe the most common usage) but: > Q: But Postman has testing and automation! > A:
by JeremyNT 1y ago
I love curl and use it all the time (copying requests from the browser is maybe the most common usage) but:
> Q: But Postman has testing and automation!
> A: So does cURL in a shell script with || and && and actual programming languages. You want assertions? Pipe to grep or write a 3-line Python script. Done.
IMO if you're reaching for an "actual programming language" it's probably time to put curl down and switch to libcurl or whatever native equivalent is in that language.
- theshrike79 1y agoThe Google style guide is a good reference: https://google.github.io/styleguide/shellguide.html#s1.2-when-to-use-shell https://google.github.io/styleguide/shellguide.html#s1.2-whe... - If you are writing a script that is more than 100 lines long, or that uses non-straightforward control flow logic, you should rewrite it in a more structured language now. Bear in mind that scripts grow. Rewrite your script early to avoid a more time-consuming rewrite at a later date. - When assessing the complexity of your code (e.g. to decide whether to switch languages) consider whether the code is easily maintainable by people other than its author.
- cassianoleal 1y agoCute, but a few years back $client was an early-ish adopter of Anthos Service Mesh (Google-managed(ish) Istio for GKE), and to install it we had to run a Bash script that was over 1,000 lines long. When we questioned the Google engineer assigned to support us, he snickered and said "you can trust it".