benchmarkingwrk

POST request with wrk?


I started to try wrk. It's very simple to use and very hard on the server, but I don't know how to perform other kind of request such as POST. In fact, I don't even know if this tool allows it. The documentation is very minimal.

Thanks


Solution

  • This is possible now. Here is an example https://github.com/wg/wrk/blob/master/scripts/post.lua.

    wrk.method = "POST"
    wrk.body   = "foo=bar&baz=quux"
    wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"
    

    save this in a *.lua script and pass it into your command line test with the -s flag.