Reputation: 91
ab -n 1 -c 1 http://localhost:2020/welTo.do?pxtId=3000007937&superDo=jack
I got answer for first query string but i also get
'superDo' is not recognized as an internal or external command, operable program or batch file.
Please help me
TIA
Regards thiru
Upvotes: 9
Views: 12450
Reputation: 619
There are two workarounds for this:
ab -n 1 -c 1 "http://localhost:2020/welTo.do?pxtId=3000007937&superDo=jack"
ab -n 1 -c 1 http://localhost:2020/welTo.do?pxtId=3000007937\&superDo=jack
Upvotes: 6
Reputation: 1506
Have you tried the post file? think this should work:
ab -n 1 -c 1 -p postfile.txt -T 'application/x-www-form-urlencoded' http://localhost:2020/welTo.do
And then make a flat file named postfile.txt with contents like this:
pxtId=3000007937&superDo=jack
Example adapted from here
Upvotes: 3
Reputation: 17378
You probably just need to quote the URL to avoid shell special characters from being interpreted. In this case your &
symbol is causing the text to the left to be run in the background while attempting to run superDo as a command.
ab -n 1 -c 1 'http://localhost:2020/welTo.do?pxtId=3000007937&superDo=jack'
Upvotes: 20