cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: A small nudge to fix a frequent -X misuse?

From: Alex Bligh <alex_at_alex.org.uk>
Date: Mon, 31 Aug 2015 16:57:31 +0100

On 31 Aug 2015, at 16:40, Aleksandar Lazic <al-curlusers_at_none.at> wrote:

> Just for my curiosity.
>
> Why don't using
>
> -G
>
> http://curl.haxx.se/docs/manpage.html
>
> ###########
> -G, --get

It's autogenerated documentation which is designed to be easy to read,
not to generate the shortest possible commandline. People may well use curl
for testing, but the point is that the resultant command-line is readable for
someone reimplementing in python, php, java, whatever. So '-X GET' says a
'get' request more obviously than '-G'.

Also there are no equivalent flags for POST, DELETE or PUT, so these
would always have to be '-X <method>' (ignoring where POST is implied
by default for the minute).

-- 
Alex Bligh
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2015-08-31