Reputation: 508
I have JSON from postman collection and i am iterating the requests list and calling ab
from my script. get is working fine.
I have json of request body, how i can send json with ab
without using external file.
Upvotes: 2
Views: 316
Reputation: 2878
Yes, ab
can read from stdin and we can use that to send JSON without using an external file.
echo '{"foo": "bar"}' | ab -p /dev/stdin -k -c 1 -n 10000 "http://localhost:8080" > ret.txt
Upvotes: 0