Just a little tangent but I think everyone should know cURL… not postman, not httpie or any other more “friendly” tool. cURL is the standard, pre-installed, do-everything, scriptable tool to interact with web APIs. I could say mostly the same stuff about knowing Bash. It separates the barely effective from hyper-effective individuals on simple day to day (programming) tasks.
>Just a little tangent but I think everyone should know cURL… not postman, not httpie or any other more “friendly” tool.
5 years ago I was partner in a startup, we got some money from government right about the time I said I have to take a few months off to do consulting and make some money, my partner said I want to use money to make app I said no for various reasons but he went ahead and did app.
So I was helping them to do the app a couple hours every night - while consulting 8+ hours a day. Anyway the guy making app was using postman, I'd never used postman. He had a problem with the a part of the API not working.
I sent him a curl request to post a two line json document to the api and showed it got the correct response back.
His response - I'm not a curl expert or anything, it would really help me out if you downloaded and installed postman and tried to make it work!
My response - I'm not a curl expert or anything, I showed you it worked in curl because that is basically the default and should establish it is possible to do. You figure out how to do it in your tool.
I've often jokingly said to people "curl or it didn't happen" suggesting they send me a single curl command I can run to re-produce it. However, every time someone's actually provided a curl command over a postman file, it's either showed it's not a bug or I've found the bug within minutes of running the command.
I'm a fan of postman for some things, it sure is easier to modify and re-run http requests over and over in some cases. But on the whole if you're trying to debug an issue, dropping down to curl solves so many problems and is pretty easy to share with anyone no matter their OS for the most part.
I am always highly annoyed when someone has documentation for their web API and all that they provide is some postman collection of crap (or a crappy code example in an arbitrary language) and some vague abstract description of their API. Then I'll have to spend X amount of time on reverse engineering it to curl so I can see what's actually going on. Often I'll discover that they're doing really weird stuff (double base64 encoding for example) and that I'm the first to notice that it is weird. When I tell them I use curl they think I'm some hacker using some obscure tool.
Too many people in our field just take the first thing that works and they won't bother to actually look at it.
Sure, then they copy that nonsense command and send it to you, without really understanding what all of the options are, and just treating it like a magic blob.
I really wish busybox would bundle curl instead of wget. In the age of containers, I often find myself having to use wget when operating inside of one with busybox as shell, and I get it wrong on first try.
What usually trips me up is the syntax: `curl -O http://host/file` (goes to stdout without -O) instead of `wget http://host/file` (goes to file without -O)
It doesn't even bundle a proper wget, just a massively stripped down HTTP client it aliases to wget. Sure, providing minimal tools is the point of busybox, but having to sniff what actually runs when you do `wget` is massively annoying. (e.g. until recently, busybox wget didn't believe in HTTPS by default)
Mentioning wget makes me embarrassed for the days (probably 20 years ago) where I used to prefer wget. Curl annoyed me because I couldn’t “simply download a file”. Needed to provide an option just to write the file to disk.
Of course now I feel really icky if im ever forced to use wget. And curl’s feature of defaulting to stdout is of course a perfect thing and makes way more sense than the alternative (for many reasons).
It shows how standard it is when you can right click a network request in browser dev tools and copy as cURL is there as one of a few other odd options. :)