title: Send different POST json for concurrent apache bench requests
body: <p>Is there a way to send different body for a post request when using apache bench?</p>
  
  <p>Here is my query</p>
  
  <pre><code>ab \
    -n 5 \
    -c 3 \
    -T "application/json" \
    -v 4 \
    -p my_json_body.json \
    http://localhost:8080/myendpoint
  </code></pre>
  
  <p>Here is my json</p>
  
  <pre><code># my_json_body.json
  { "foo": "bar" }
  </code></pre>
  
  <p>What I want to do is to send a different json body for half of my concurrent requests (-c means concurrent) </p>
  
  <p>So if I send four requests at a time, I want two of them to send</p>
  
  <pre><code>{ "foo": "bar" }
  </code></pre>
  
  <p>and I want two of them to send</p>
  
  <pre><code>{ "hi": "bye" }
  </code></pre>
  
  <p>Is this possible? The docs do not mention it as a possibility but it seems like it is a feature that might be in there somewhere. <a href="https://httpd.apache.org/docs/2.4/programs/ab.html" rel="nofollow">https://httpd.apache.org/docs/2.4/programs/ab.html</a></p>