val scn = scenario("gatling test").
feed(circularfeeder.circular)
.exec(http("request")
.post(endpoint)
.header("Content-Type", "application/json")
.header("Accept-Encoding", "charset=UTF-8")
.body(StringBody("""${request}"""))
.check(status.is(200))
The above code is used to send every circularfeeder data as a string to the body of the request. Suppose if i want to send as byte array instead of string in the body how do I modify the line .body(StringBody("""${request}"""))
The code .body(ByteArrayBody(getBytesData("""${request}""")))
does not work. Any advise?
Option 1
Call
getBytes
method onrequest
string and pass that toByteArrayBody
Option 2
Convert the raw data you got from your feeder.