I'm trying to test if my application can handle multiple simultaneous POST requests with custom headers.
I'm aware of this answer, Run multiple curl commands in parallel, but it doesn't quite meet my needs:
I want to send multiple, pre-defined post requests (with request bodies defined in .json files), and I want to send them all at once.
This is where I've got to. Am I missing something, or is this a reasonable way of executing this task?
curl --parallel --parallel-immediate --parallel-max 3 -u user:password -X POST -H "Content-Type: application/json" --data @data1.json -H "customheader: customheader1" http://localhost:8000/rest/api/2/entity/ -X POST -H "Content-Type: application/json" --data @data2.json -H "customheader: customheader2" http://localhost:8000/rest/api/2/entity/ -X POST -H "Content-Type: application/json" --data @data3.json -H "customheader: customeheader1" http://localhost:8000/rest/api/2/entity/
Many thanks!