Live data from Hacker News

Just Use Curl

justuse.org

111–120 of 154 posts

Re: Just Use Curl

#111

Earlier quoted context omitted.

You can’t compose GUI unless you go the emacs and smalltalk route (MacOS AppleScript is a very poor example). The one thing with CLI tools is how easy to compose them and have something greater. Also more versatile than a GUI app. Also they’re more stable than anything else. You can coast for decades on a script.

Anything you can do in a terminal can be done with what I suggested because what I suggested was literally using buttons to write a terminal command.

Not really. In a terminal the whole input can be dynamic with variables, pipe and executors like find’s exec, xargs and parallels. That’s pretty much the whole point of a shell and CLI interaction.

Re: Just Use Curl

#113

Earlier quoted context omitted.

> Who says I'm allergic to the terminal? I already stated that I use curl. Preferring "a couple of clicks" vs "run one command" seems to indicate so, otherwise I'm not sure why'd someone would prefer the former instead of the latter.

I have dozens of collections with hundreds of requests, most sending complex payloads, all perfectly organised hierarchically. I'd rather use a collapsible UI for that, if you prefer to have hundreds of scripts in folders that's fine too. Actually I don't even create those collections, we have OpenAPI/Swagger docs for all of our APIs and I just import them with a couple of clicks (which I'm sure there's a way to do w…

> I'd rather use a collapsible UI for that, if you prefer to have hundreds of scripts in folders that's fine too.

No, I don't (what a shitty strawman), I create abstractions then, like any other project. Surely you don't have hundreds of completely original and bespoke requests? Previously I've handled thousands of requests by having a .csv to load from.

Re: Just Use Curl

#114
post #44

If you're able to use a curl release after March 2022, --json [1] is a great shortcut for REST API calls. [1]: https://curl.se/docs/manpage.html#--json

For the record, since version 7.82.0.

Re: Just Use Curl

#115
post #15

After decades it should have been obvious by now that the vast majority of users prefer GUIs.

Yeeeep. My response to this article is the same one I have to anyone out here screaming "it's so easy to just do it my way!": if it's so easy, then do it for me! The ffmpeg fans are the loudest screechers I've found, in this area. They'll point to the trainwreck of a UX that is Handbrake as an example of GUI for terminal commands. And, look - command line utilities are great and Handbrake is a super good product that…

What's supposedly wrong with Handbrake UX?

To me it seems like the complexity is just irreducible. There's so many formats, so many bits and pieces that can go in a video stream, they're not very visualizable, and they have surprising edge case interactions. Not to mention there's a lot of "normally the program figures this out for you, but there's an option to override it if broken" knobs and dials.

Re: Just Use Curl

#116
post #69

Does anyone have suggestions for when I need to use bearer auth and the token is super long? With curl I end up finding the command becomes hard to read, even taking advantage of backslashes. With Postman, it tidily hides the token out of the way on a separate tab and gets out of my way.

What i do is assign the token to a variable. I typically copy the secret to my clipboard, and then use the pbpaste command in macos terminal when assigning it to avoid secrets in my command history.

I love the second part of your tip, thank you.

Re: Just Use Curl

#117
When I made the script httpstat [1] 9 years ago, I had this exact thought - if I want to show the statistics of a HTTP request, why not just use curl, why bother working out the figures myself? And since then, the more I use curl, the more I find it robust, sophesticated and irreplaciable. It's the only thing and everything I need.

[1]: https://github.com/reorx/httpstat

Re: Just Use Curl

#118
post #9

There's also hurl: https://hurl.dev You define all your requests in a plaintext format and can inject variables etc... plus the name is kinda funny.

Emacs had something like this long ago (of course it did).

https://github.com/pashky/restclient.el

I also like httpie but they seem to have gone commercial.

Re: Just Use Curl

#119
Unless you're on Windows, which comes with a special version of curl that misses some crucial functionality.

I didn't think I've the successfully used curl in my life though. Every time there's confusion about parameters. It's always been was faster to just write a quick python script that uses requests.

Plus the author can be a bit special. One of the most overrated pieces of software on the planet

Re: Just Use Curl

#120

Earlier quoted context omitted.

Inversely, plenty of people use GUIs for all of those things.

Yes, I agree, and have no qualms with people who prefer GUIs. But to say that "majority of users (developers?)" prefer GUIs seems outlandish at best.

Many developers are on Windows, and those tend to prefer GUIs. CLI reliance is mostly a macOS/Linux thing.
Post reply on HN