curl-users
multiple POST requests while reusing the TCP connection
Date: Wed, 6 Nov 2013 17:43:43 +0200
Hi guys!
I have a question regarding the cURL command line tool.
If multiple URLs are passed to cURL, it reuses the TCP connection when
possible.
For example:
curl -o 1.jpg http://example.com/1.jpg -o 2.jpg http://example.com/2.jpg
I need to do the same, but with different post queries to the same URL.
I thought maybe this would work:
curl -d "a=1" -o 1 http://example.com/script.php -d "a=2" -o 2
http://example.com/script.php
But instead of separating the -d arguments per request, it just adds them
together.
Is there any way to achieve what I want with cURL?
Thanks in advance.
-------------------------------------------------------------------
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-06