I have a POST request which might have some different properties depending on my scenario. I'm trying to exec(session -> session.set("payload",...))
to store the appropriate template for the request before the actual call to post().body(StringBody("#{payload}"))
but then any EL tags in the template aren't being replaced.
I'm guessing StringBody()
doesn't process EL tags inside the value recovered by an EL tag.
How could I have a variable body for my post and still have the EL tags in it processed?
Use ElFileBody
instead StringBody
https://gatling.io/docs/gatling/reference/current/http/request/#elfilebody
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.