Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vegeta load test for POST Api

I want to test a few POST APIs using vegeta, but the post payload is not getting send properly.

vegeta command:

vegeta attack -targets=tmp -rate=1 -duration=1s | tee results.bin | vegeta report

tmp file:

POST http://server-ip/api/salon
@saloninfo.json

saloninfo.json file:

{
  "salon_id" : "562737c1ff567dbd5574c814"
}

Basically, the payload is going empty {}.

Can someone please check, what i might be missing.

like image 622
Kushal Singh Avatar asked Jun 29 '16 14:06

Kushal Singh


1 Answers

I believe that this should do the trick:

POST http://server-ip/api/salon
Content-Type: application/json
@saloninfo.json
like image 51
beatcracker Avatar answered Oct 08 '22 23:10

beatcracker