title: Karate - Setting global request headers
body: <p>So I've managed to write a bunch of tests and in every feature file I set the same request headers. </p>
  
  <p>For example:</p>
  
  <pre><code>Given url appUrl
  And path '/path'
  * header Accept = 'application/json'
  </code></pre>
  
  <p>I'd like to know if there's a way to set a header once so that it is set before each scenario is run. I've read the documentation and tried the callSingle method as follows in karate-config.js:</p>
  
  <pre><code>karate.callSingle('classpath:api/Utilities/Feature/header.feature');
  </code></pre>
  
  <p>header.feature looks like:</p>
  
  <pre><code>Feature: common routing that sets the headers for all features
  
    Background:
      * configure headers = { Accept : 'application/json' }
  </code></pre>
  
  <p>And example feature where I expect the headers to be preset:</p>
  
  <pre><code> Feature: Header Preset
  
        Scenario: I expect the header to be set
          Given url appUrl
          And path '/path'
          When method get
          Then status 200
          * print response
         #I expect the response to be returned in JSON format 
  </code></pre>
  
  <p>However I'm unable to get this working. I don't think I've understood how the callSingle method works. Some pointers would be helpful. Thanks.</p>