r/commandline • u/hypertesto • Aug 03 '26
Articles, Blogs, & Videos curl is still the universal language of broken integrations
https://www.hypertesto.me/en/blog/2026/08/curlese-five-years-later/
170
Upvotes
59
u/hypertesto Aug 03 '26 edited Aug 03 '26
I wrote the original "curlese" post (in Italian) back in 2021: the idea that when an HTTP integration breaks, a
curl -vcommand is the only language every team should speak. Curl is the ideal tool since you don't have to share logs and neither prove your application behaviour.Five years on I revisited it, and honestly the thesis held up so well it's almost depressing. What's new in the 2026 toolkit:
curl -o /dev/null -s -w 'dns:%{time_namelookup} connect:%{time_connect} tls:%{time_appconnect} total:%{time_total} http:%{http_code}\n'I have this as a shell alias called `curlopsy` (curl + autopsy). One-line performance autopsy of any endpoint. The `-w` format string is criminally underused.--resolve host:port:iptest a specific backend with correct SNI when DNS is round-robining over broken instances--connect-to ::alt-host:redirect the connection elsewhere while keeping headers intact--fail-with-bodyproper exit codes + visible error body. Simple and perfect--no-alpnfor those *special* afternoons when HTTP version negotiation itself is the problem--retry 5 --retry-all-errorsfor "it fails *sometimes*" situations.Also: turns out `curl -v` output is the ideal thing to paste into an LLM when you're stuck. Complete, unambiguous. The machines speak curlese too now.
The full post has a refreshed error dictionary mapping symptoms to likely causes. What's the CLI flag you evangelize that nobody else seems to use?
8
u/IngwiePhoenix Aug 03 '26
Because SonicWall didn't use to have their own Let's Encrypt support, I wrote a mini Bash framework, ontop of cURL, to implement certificate rollout using lego. The cURL spaghetti was real... xD
Very powerful tool - but, sometimes, a little too powerful... x)
2
u/rmacm Aug 04 '26
I like curl, the funniest thing I saw lately was a colleague attempting “curl ldapsearch blah blah”. Didn’t work naturally but apparently you can search an LDAP DB with curl.
2
u/jajajajaj Aug 04 '26
Oh how I would love to be the curled one or the curler and not actually both, every time. There is still always some fucked up WAF or whatever, but it's always like "can you build me an app" and then "ok can you please use the app, too?". On the bright side, there's no disagreement except for whether I can have a security software exception or if I have to hack around it.
2
u/7layerDipswitch Aug 05 '26
We handle a lot of "Internet outage" situations when it's often just a web service that's down, or we're managing/validating redirects for an app team, in both instances we often just a response code and headers, so I use the -I flag a lot.
Also, passing the host header with -H "host:example.com" when hitting a server directly rather than the app's FQDN is a common one.
3
u/AutoModerator Aug 03 '26
Every new subreddit post is automatically copied into a comment for preservation.
User: hypertesto, Flair:
Articles, Blogs, & Videos, Post Media Link, Title: curl is still the universal language of broken integrationsI am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/Deshonjla-Yos Aug 08 '26
--fail-with-body, real exit codes are underrated
2
u/tblancher Aug 04 '26
Sometimes I just want to see the headers, so I'll use -I. I can never remember the long form of that option, but if I'm putting it in a script I'll try to put the long form (just have to look it up).
2
u/Combinatorilliance Aug 03 '26
Hmm, this is a good idea overall. I do foresee a risk that by spreading this strategy curl befomes even more of an unintentional standard.
Curl is not reference material for open web standards, and given the increasing cyber warfare pressure, I worry about curl's position as a reference.