Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I think it's you.
-d -- data
-H -- header
-s -- silent
idk, it all makes sense to me -
jiffier1725yI'm not using the CLI. I'm using the PHP api (curl_setopt, curl_exec, etc..). I'm just trying to list the files on a remote sftp server, and the api is pure crap. The are just two commands: curl_init, curl_setopt, and curl_exec. But there are hunders of constant for CURLOPT, which motivated my rant.
-
This is mostly the raw libcurl C api. Most of them seem counterintuitive, but this comes from the reason because of missing object orientation.
-
jiffier1725y@sbiewald curl is an ancient piece of software. I bet it was born as a hack, back in the 90s, one of those hacks that grew and grew, adding options and flags, new protocols and shit, and now we have.. this :(
-
C0D4669025yUsing cURL for SFTP?
Why wouldn't you use ssh2_sftp?
Although cURL has a fuck tonne of curl_opt's you rarely need more then a handful. -
jiffier1725y@C0D4 Because I'm stupid and I didn't know about ssh2_sftp :( Thanks, I'll give it a try, you made my day!
BTW, the curlOpt I was looking for is CURLOPT_DIRLISTONLY. OMG. -
Curl is fine until you need to send a JSON with multiple layers of escaped quotation marks.
-
I second your complaint about the PHP API, but as said before, that's an inheritance from C. I would suggest you to edit the initial post and add appropriate tags and clarification. As also said before, the original cURL API is pretty ok.
-
@C0D4 and rule no 2, never meet, talk or even see that person ever again.
take it from me
Is it me, or is does Curl have the uggliest and most counterintuitive api I've ever seen?
rant