Hi Stephanie,
I’m trying to post a request along with JSON body using gatling. However, the body is not getting attached with request.
I know this for sure because expected response with request body and without it is different.
Here is my code:-
class RecordedSimulation extends Simulation {
val httpProtocol = http
.baseURL(url)
.inferHtmlResources()
val headers_0 = Map("Origin" -> "chrome-extension://aejoelaoggembcahagimdiliamlcdmfm")
val uri1 = "abc.com"
val scn = scenario("RecordedSimulation")
.exec(http("request_0")
.post("/abc/efg")
.headers(headers_0)
.body(RawFileBody("RecordedSimulation_0000_request.txt"))
.basicAuth("uid","pwd")
.check(bodyString.is(RawFileBody("RecordedSimulation_0000_response.txt"))))
setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)
}