Hello people,
I’m trying to parse a response header value (which is a string) of one request into another method or function in gatling. Here is what I’ve tried
val scn = scenario(“DeviceAuth”)
.feed(csvFeeeder)
.exec(http(“Request1”)
.post(“endpoint”)
.headers(headers_0)
.formParam(“key”, “value”)
.check(headerRegex(“header”,“pattern.*)”).saveAs(“value”))
.check(status.is(401)))
object getHeader {
def authenticationHeader: String = {
val header: String = “${value}”
val s = header.split("")
–so on and so forth–
}
}
So, when I tried to print the header value, it’s just printed "${value}. How can we pass that value into my function? Please help me