points by mschuster91 4 days ago | 0 comments
> People should be using curl + bash. It's a universal combination available almost everywhere.
They should but Bash escaping/encoding is nasty and most terminals have a hard time using the mouse to reliably edit a cURL command, especially if the last command didn't do a final "\n" output. And it gets oh so tiring when the "copy cURL" command includes about 1000 bytes worth of Cookie headers full of analytics garbage.
That's why Postman became a thing in the first place.
[–] dspillett 4 days ago
[–] liendolucas 4 days ago
Yes, that's true. You can suffer a lot escaping things out, but is also a valuable lesson! Not promoting those extreme cases, but many many times a few simple curl calls can save your day.
This is true. Even though I'm not much of a mouse user for it, I tend to edit curl commands of much length in a text editor when I'm doing things by hand, then pasting into the terminal.
> especially if the last command didn't do a final "\n" output
Or if your prompt outputs something to stderr instead of stdout so it doesn't get counted when the shell is trying to position where you are in editing the stream. Ubuntu's default prompt under byobu is a pain for this when I move to a different machine and forget to carry my tweaks for that.
For the missing final \n I just hit [enter] an extra time, but getting round the stderr thing isn't quite that simple.