sudo apt-get install apache2-utils
ab -n 10 -c 2 http://dummy.restapiexample.com/api/v1/employees
ab -p ./post.txt -T application/json -H 'Some-Header: value_of_header' -n 10 -c 2 http://dummy.restapiexample.com/api/v1/create
Content of post.txt:
{"name":"test","salary":"123","age":"23","id":"719"}
-p : POST a file (post.txt has the JSON data to be POST'ed)
-H : Add a header
-T : Set a content type
-c : no. of concurrent clients
-n : total no. of requests