cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: An idea on separate options for different URLs

From: JustAn0therAcc0unt <mailnew4ster_at_gmail.com>
Date: Wed, 13 Nov 2013 01:29:31 +0200

On 01.08.2004 0:09, Daniel Stenberg wrote:
> Hi
>
> I would like to enhance the tool curl to make it able to deal with
> options set to specific URLs, so that we can make multiple requests
> easily, using a single command line (and thus use persistent connections
> etc).
>
> It struck me the other day that perhaps the best way to support this,
> would be to introduce a totally new kind of separator that is not an
> option (that starts with - or --) and not a URL (that would start with a
> letter or number), but perhaps should be something like... ':'! (Picked
> because it is not special to most shells, such as '!', '#', '&' or
> different parentheses etc are).
>
> I realize this is totally unorthodox but it isn't an option, it just
> separates options, and it isn't a URL...
>
> Let me give you a few examples, to show you how it would work:
>
> make a POST, a GET and then a HEAD:
>
> curl -d "moo" URL1 : URL2 : -I URL3
>
> make an upload then download it:
>
> curl -T uploadthisfile URL : URL
>
> you could still do multiple URLs in each part, like to download three
> URLs, then upload two files:
>
> curl URL1 URL2 URL3 : -T file[1-2] URL4
>
> ... each ':' would reset all options so you need to repeat options you
> want for all "sections". Like if you want to do a GET and a HEAD, both
> using the verbose option:
>
> curl -v URL1 : -I -v URL2
>
> Or can anyone come up with a better separator? Or even a better system
> that is easier to use?
>
> I'm interested in your feedback!
>

Hello from 2013!

I fully support the idea. This small feature would allow doing requests
which are currently not possible.
As today there's not a single way of doing different requests on a
persistent connection with curl, I believe this feature is very
important and is worth implementing.
-------------------------------------------------------------------
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 2013-11-13