I\'d like to use cURL to test flood handling on my server. Right now I\'m using this on a Windows command line:
curl www.example.com
While curl is a very useful and flexible tool, isn't intended for this type of use. There are other tools available which will let you make multiple concurrent requests to the same URL.
ab is a very simple yet effective tool of this type, which works for any web server (despite the introduction focusing on Apache server).
Grinder is a more sophisticated tool, which can let you specify many different URLs to use in a load test. This lets you mix requests for cheap and expensive pages, which may more closely resemble standard load for your website.
Curl may not do it itself but bash can.
curl -o 1.txt -X GET https://foo & curl -o 2.txt -X GET https://foo
I had a similar case and I ended up writing a python script:
import threading
import requests
def thread_function(url):
response = requests.get(url)
thread1 = threading.Thread(target=thread_function, args=('http://foo',))
thread2 = threading.Thread(target=thread_function, args=('http://bar',))
thread1.start()
thread2.start()