I want to include a JWT header with my Gatling POST request.
I am doing something like this:
val R1= scenario("Scenario")
.feed(idFeeder)
.header("", "",
Jwt.sha256(requestBody), "", "", "")))
.body(
StringBody(session => requestBody.replace(
"0000000000",
session("id").as[String]
))
).asJSON
Where "id" is a session attribute which contains a randomly generated id to be added to the requestBody. How can I obtain the id substituted request body in Jwt.sha256(requestBody) which send the request body to the JWT class to get the hash of it (Which should be included in the JWT header)
Jwt.sha256() requires a String and returns a URL encode of the string