curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: bash curl multiple requests same connection

From: taylor park via curl-users <>
Date: Thu, 12 Mar 2020 18:38:40 +0800

Thank you for your reply。 :
The curl command-line tool can, however, only keep connections alive for as
long as it runs, so as soon as it exits back to your command line it has to
close down all currently open connections (and also free and clean up all
the other caches it uses to decrease time of subsequent operations)

Creating a TCP connection takes some time
so i want send tow requests use the same connection
The second request needs to be submitted after processing the first

Dan Fandrich via curl-users <> 于2020年3月12日周四

> On Thu, Mar 12, 2020 at 05:55:41PM +0800, taylor park via curl-users wrote:
> > I want use the same connection submitting two URL ,i can use the "--next"
> > option.
> >
> > curl -X "GET" --next -X "POST" -d @file
> Note that the -X options here are completely unnecessary.
> > how can i submit the first URL and submit seconde URL use the same
> connection
> > after deal with some date ?
> If you add -v to the command you will see details on whether the
> connection is
> reused or not, e.g., "* Re-using existing connection! (#0) with host
>". It should be if the server supports it. I don't know what
> you
> mean by "deal with some date".
> Dan
> -----------------------------------------------------------
> Unsubscribe:
> Etiquette:

Received on 2020-03-12