Am not sure how to intercept request sent from my Eclipse setup with gatling, However when I do same request from Postman or one of my tool this is how payload looks like and it works fine:
- Request Payloadview source
{User: {@name: "test2", @password: "Test1234"}}
- User: {@name: "test2", @password: "Test1234"}
- @name: "test2"
- @password: "Test1234"
Now I changed my request string to : .body(StringBody("""{User: {@name:"Test3", @password: "Test1234"}}""")).asJSON
and same error appears: 12:08:11.016 [WARN ] i.g.h.a.AsyncHandlerActor - Request 'request_0' failed:
status.find.in(200,304,201,202,203,204,205,206,207,208,209), but actually found 500
And am not convinced that its server who is culprit as sending JSON body like this .body(RawFileBody("User.json")) works perfectly fine.