I need to create a scenario where I use the data (as JSON) returned in one request, store it in session, and then reference it (with a little help from Scala) in another request.
What I do not want to do is put an exec( session => … ) between the two requests. Instead, I want to have a check( …saveAs ) in one, and then reference and apply logic to what is saved in the other.
In other words, I would like to do this:
http( “my request” )
.post( url )
.body( session => {
// compose the body string and return it
})
Does Gatling 2 support that kind of thing, and if so, is that the syntax or is there some other way I need to do it?