Wednesday, 3 May 2017

Request body is not properly feined in loadtest

I was using loadtest for load tetsing of my node app. I had issue sending post requests via loadtest. The request is of the form:

loadtest http://localhost:7000/eth/checkEthBalance -T "application/x-www-form-urlencoded" -H "application/x-www-form-urlencoded" -m "POST" --data '{"accountAddress":"0x62720366ef403c9891e2bfbd5358ee3c8a57b113"}' -n 1

But in req.body, I am getting:

{ '{"accountAddress":"0x62720366ef403c9891e2bfbd5358ee3c8a57b113"}': '' }

instead of:

{"accountAddress":"0x62720366ef403c9891e2bfbd5358ee3c8a57b113"}

However a curl request workd fab:

curl -X POST \
  http://localhost:7000/eth/checkEthBalance \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -H 'postman-token: 0bf637f7-2037-c4ca-29a7-cc2310786317' \
  -d accountAddress=0x62720366ef403c9891e2bfbd5358ee3c8a57b113

DOn't know what's wrong with loadtest. Any help?



via Prashant Prabhakar Singh

No comments:

Post a Comment