What is the most efficient way to access response header

Hi there,
my scenario accesses a web service and expects response codes 200 and 404.
In case of 200 the response header contains an “Etag” which should be stored in session.

I use with Gatling-2 Snapshot

.check(status.saveAs(“status”), status.in(Seq(200, 404)), header(“Etag”).saveAs(“Etag”)))

but in case of 404 thee is no response Header and I get
KO header(Etag).exists, found nothing

Thanks in advance
–Ulrich

.check(status.saveAs(“status”), status.in(Seq(200, 404)), header(“Etag”).dontValidate.saveAs(“Etag”)))

You’re probably looking for .dontValidate I guess.

cheers
Nicolas

Thanks