Because it took me a disproportionate amount of time to figure this out the second time I'm writing it down:

ab -n 1000 -c 25 -p sessionkey2.post -T "application/x-www-form-urlencoded" "https:/
/127.0.0.1:8443/SessionKey"

The trick is specifying -p <postfile> and -T <content-type for post file data>.

The postfile above looks like:

key1=value&key2=another+value

All as one long url encoded line.

Encoding the post data is really quite easy to do in python:


import urllib
pv = {"key1":"value",
      "key2":"another value"}
print urllib.urlencode(pv)



Comments

pixou
super thanks, saved my day !