Unique header value for every Request

Hi,

I have trouble generating unique header value for a specific key for every single user request. Below is the code I am attempting , however the “x-hey” header value is always the same value

object TestCreateScenario {

val scn = scenario(“Payment Post”)
.exec(
http(“request_3”)
.post(“http://localhost:8000/api/pyme”)
.header(“x-key”, session => getXKey())
.header(“Content-Type”, “application/json”)
.body(StringBody(GenerateData.generate())).asJSON
.check(status.is(200))
)

def getXKey() : String = {
UUID.randomUUID().toString()
}
}

I want to generate diff value for “x-Key” header for each request.

Appreciate your help

Thanks,
-Rejy

Sorry , it was my bad. I have added a different header element elsewhere which caused the issue. Its working fine now.

Thanks,
-Rejy