Is there a way to apply common checks?

For debugging purposes, I like to extract the status, Location Header (if it is found), currentLocation and bodyString, so I can do a debug dump of those values if the status is not what I expect it to be. But that feels like a major violation of the DRY principle.

Would it be possible (without modifying core Gatling code) to do something like this:

http( “description” )
.get( path )
.headers( stuff )
.check( status.is( 200 ) )
.debugInfo()

Where “debugInfo” is the equivalent of adding 4 more checks?

Does Scala make that kind of thing possible?

I would settle for something like “.check( debugInfo )” or something. Thoughts?

That's called "Pimp my Library":
http://alvinalexander.com/scala/scala-2.10-implicit-class-example