tsenart / vegeta

HTTP load testing tool and library. It's over 9000!
http://godoc.org/github.com/tsenart/vegeta/lib
MIT License
23.51k stars 1.36k forks source link

-format=json example in README does not work #381

Closed mgartner closed 5 years ago

mgartner commented 5 years ago

The example in the README for using -format=json does not work. https://github.com/tsenart/vegeta#json-format

jq -ncM '{method: "GET", url: "http://goku", body: "Punch!" | @base64, header: {"Content-Type": ["text/plain"]}}' |
  vegeta attack -format=json -rate=100 | vegeta encode

The body is not correctly sent to the server. Vegeta should be un-base64-encoding the string and passing to the server. It appears that it is sending nothing to the server in the body.

It's also weird that the body needs to be base64 encoded. It would be nice if that extra ceremony were not necessary.

tsenart commented 5 years ago

Please open a Bug Report