When you set manually a value in the session using set(name, value), like you did with .exec(_.set(“TOKEN”, "${memberID}”)),value cannot be a EL string.
But then, why don’t simply write .header(“X-Token”, “${memberID}”) ?
Hi Pierre,
Ok, but will Gatling then use the same line in my testdatafile when I do like below? Will the two highlighted red ${memberID} refer to the same row in the testdatafile?
and it will pick up memberID first as a header and then as a value inside my request (json-body), both being the same row in the testdata .csv file? right.
I can use it both as a direct parameter within my exec ( .header(“X-Token”, “${memberID}”)) and inside son body like this:
Yes you can.
As long as you do not add another feed(…) call in your scenario, the same record will be used throughout the scenario, as many times as you want.