title: How can I add a default header to each HTTP request with Gatling?
body: <p>I'm using Dynatrace and Gatling for performance analysis and testing. Dynatrace supports tracing test runs through the addition of a header to each HTTP request.  I'd like to had that header with a dynamic test guid without adding it to every request individually in 100s of places.</p>
  
  <p>An example test:</p>
  
  <pre><code>def GetLocationPage = exec(http(domain + "GetLocationPage")
  .post("/location ")
  .formParam("updateVersion", "1")
  </code></pre>
  
  <p>I understand that I could add the header individually in each request with...</p>
  
  <pre><code>.headers(gatlingHeaders)
  </code></pre>
  
  <p>... but my goal is to avoid doing that 100s of places in the code. Essentially, I'm looking for a Gatling equivalent to <a href="http://springinpractice.com/2013/10/27/how-to-send-an-http-header-with-every-request-with-spring-resttemplate" rel="nofollow noreferrer">this functionality</a> in Spring. </p>
  
  <p>I found <a href="https://github.com/gatling/gatling/issues/2597" rel="nofollow noreferrer">this issue</a> on Gatling, but wasn't able to determine if it would be useful.</p>
  
  <p>Any recommendations? </p>