If multiple URLs are passed to cURL, it reuses the TCP connection when possible.
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?
If not, is there another tool which is likely to be present on a Linux system (e.g. Wget) which can do the above?