Example of using Apache Bench command to post data to a url (on a mac):
I use bat
instead of cat
$$>> bat data.json
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: delete.json
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ {"Another": "Echo"}
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
$$>> ab -l -d -q -r -S -c 249 -n 999999 -T 'application/json' -p data.json http://<url>:<port>/
The above is the equivalent in curl as below:
curl -L --data '{"Another": "Echo"}' \
--header "Content-Type:application/json" \
http://<url>:<port>/