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

How to send a body with x-www-form-urlencoded content type #504

Closed dilshan5 closed 4 years ago

dilshan5 commented 4 years ago

Question

Hi,

With Vegeta, i'm trying to send a body with x-www-form-urlencoded content type. I converedt the text to url encoded string format and save it to a text file. And then sent using -body. But i'm getting 401.

How can we send a body with x-www-form-urlencoded content type using Vegeta?

Thanks, Dilshan

dilshan5 commented 4 years ago

This was helped me..

echo "POST <url>" | vegeta attack bodyf='client_id=test&client_secret=test' -header 'Content-Type: application/x-www-form-urlencoded' -rate=100 -duration=10s -timeout=100s | vegeta report