How to Parse the response string of a request into another method in gatling

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”)
.formParam(“key”, “value”)
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