headerRegex does not return value in 2.0.0-M3a

val httpConf = http
.baseURL(“https://www.google.com”)
.acceptHeader(“text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8”)
.acceptLanguageHeader(“fr-RF,en;q=0.5”)
.acceptEncodingHeader(“gzip, deflate”)
.disableFollowRedirect
.disableWarmUp

val users = scenario(“Users”)
.exec(http(“Hello”).get("/").check(
status.is(302),
headerRegex(LOCATION, “.*”).findAll.saveAs(“redirectURL”)))
.exec(session => { println(session(“redirectURL”).as[Seq[String]]); session })

setUp(users.inject(atOnce(1))).protocols(httpConf)

Works fine for me, prints ArrayBuffer(https://www.google.fr/?gws_rd=cr, ) as expected.
Maybe a typo somewhere

thank you for your attention, i managed to get it working by adding verification keyword “whatever”

.check( header(LOCATION).findAll.whatever.saveAs(“location”) )

and i get the same result as you do.
but how do i access elements of this array using EL? i need “https://www.google.fr/?gws_rd=cr” but not “ArrayBuffer(https://www.google.fr/?gws_rd=cr )”

Then why do you use findAll and not a regular find (which is an alias for find(0)?

In Gatling EL, if foo is the key for a Sequence, you can use ${foo(i)} to retrieve an element:

https://github.com/excilys/gatling/wiki/Session#wiki-el

you are right, my bad.
thank you for your help!

GLHF