cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: POST

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 8 Jan 2013 16:37:34 +0100

On Tue, Jan 08, 2013 at 04:20:11PM +0200, Johan Moraal wrote:
> This posts 4 files to the server consecutively. The problem is that curl closes
> the connection and exits. Then a new instance of curl is started to post the
> next file.
>
> I want one instance of curl to stay alive, and to generate a new HTTP request
> for each file, over the same connection. How do I accomplish that?

The curl command-line tool doesn't allow you to do that--it doesn't
allow different parameters between accesses to different URLs. You'd
have to write an application using libcurl to keep the connection open
between POST requests. Which wouldn't actually be that hard to do; the
--libcurl option will almost write the program for you.

>>> Dan
-------------------------------------------------------------------
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-01-08