Reputation: 45
I want to know how I can issue multiple, different cURL requests concurrently to a RESTful API, to test my application. I'm using a Maru RESTful API for Elixir, and my requests only differ in the GET arguments. My cURL requests look something like:
curl -X GET http://localhost:8880/path -G -d "data1=abc&data2=123&..."
where the values of data1
, data2
etc. differ. I would prefer some sort of a tool like ab, the Apache HTTP server benchmarking tool, but ab only allows concurrent requests of the same kind. I am trying to test my application for concurrent, differing responses to the different, concurrently issued cURL requests.
Upvotes: 0
Views: 1028
Reputation: 76414
You will need to make your cURL requests asynchronous, so they can run in the same time and when they are finished, a callback function is called. However, this will not necessarily solve your problem, since there is a chance that the remote API is using something like IIS, serving requests sequentially.
Upvotes: 1