Live data from Hacker News

Just Use Curl

justuse.org

61–70 of 154 posts

Re: Just Use Curl

#61

I might get lit on fire for this, but I don't find manpages very easy to use. If want to quickly remember an option or argument order, I am met with a wall of text. Does anyone have tips for how to make it more useful? Maybe I could grep better for options? For example in the link, the author lists out common curl commands like making a POST request or adding a header. If you tried to look through the manpage for thi…

Ask your AI tool of choice - it’s great at reading manpages. I also add my most favourite prompt instruction “be succinct”. :)

Re: Just Use Curl

#62
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.

Re: Just Use Curl

#63
Curl is great for running individual API calls, API clients are great for when you're actually working on the API or architecting an app with one. Not that there are things one can't do with API development from the CLI, but there is a lot more to API clients than that feature list (it doesn't even include anything around stuff one might want to do with openapi definitions!) and by the time you string it all together you get why people like the tool that did that for them instead.

Re: Just Use Curl

#64

I might get lit on fire for this, but I don't find manpages very easy to use. If want to quickly remember an option or argument order, I am met with a wall of text. Does anyone have tips for how to make it more useful? Maybe I could grep better for options? For example in the link, the author lists out common curl commands like making a POST request or adding a header. If you tried to look through the manpage for thi…

Add this to the end of .bashrc

function cheat() { curl cht.sh/$1 }

Then in terminal you can use the following to see the examples: $ cheat curl

Re: Just Use Curl

#65

Earlier quoted context omitted.

I use both. It's quite convenient to have all the collections available and just send the request with a couple of clicks.

For repeated commands, my projects have a Make/Just file that has cURL commands I wanna validate. Sometimes I even load JSON from a tests/fixtures/*.json file, that also can be reused for other non-E2E tests. Not sure how some developers could be so allergic to the terminal, don't you already spend a lot of time there?

Even those who spend a lot of time in the terminal are capable of recognizing its limitations.

Re: Just Use Curl

#66

I've been using curl, like forever. I don't understand the preoccupation for using postman, et. al. -- why pay for something that literally requires a little bit of light RTFM?

Using curl, how would I send a collection of frequently used requests to a coworker? Plain text file?

> Plain text file?

Works everywhere.

It could be a script or a markdown with code blocks. I believe there’s wrapper with a more codified formats like .http.

Re: Just Use Curl

#67
post #25

I've been using curl, like forever. I don't understand the preoccupation for using postman, et. al. -- why pay for something that literally requires a little bit of light RTFM?

I am new to curl. We use secure connection to Visa and Maactercard API. We have the certificate in a jks file. Is there a way to send the json request that one sends in Postman but in curl while also using the jks file? Similarly, we use SoapUI to send XML requests. Is there a way to send those XML requests using curl while also using the jks file? Greatly appreciate your help.

Come on. One google search for curl jks and the first StackOverflow result has what you are looking for.

Re: Just Use Curl

#68

Curl's UX is very dated and I wouldn't recommend it to any new user. Use many alternatives like httpie [1] or something like curlie [2] which is just an UX wrapper around the same libcurl. Httpie also has a postman-like web interface. 1 - https://httpie.io/ 2 - https://rs.github.io/curlie/

curl may be outdated but at least it's a survivor. the alternatives (esp. the suspicious httpie grift) won't make it.

Re: Just Use Curl

#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.

Re: Just Use Curl

#70
post #6

> It's already on your machine, dipshit Does anyone actually enjoy this uhm style of writing?

It takes me back. This was normal discourse in the 80s and 90s in the development community, especially the BBSs and telnet communities. I think the entire development community back then was afflicted with Tourette's Syndrome!
Post reply on HN