title: Can Postman Variables be Passed Into Header?
body: <p>I am trying to string a few <strong>Postman</strong> requests together for testing.</p>
  
  <ol>
  <li><p>In the first request I set a global variable as a <strong>test script</strong>.</p>
  
  <pre><code>tests['Status code is 200'] = (responseCode.code === 200);
    if (responseCode.code === 200) {
    try {
      let jwt = responseBody.replace(/"/g, '');
      pm.globals.set("jwt", jwt);
      console.log("Variable will be set to", jwt);
    }
    catch(e) {
      console.log(e);
    }
  }
  </code></pre></li>
  <li><p>In the second request I run a <strong>pre-request script</strong> as</p>
  
  <pre><code>let jwt = pm.globals.get("jwt");
  </code></pre></li>
  </ol>
  
  <p>Then I try to pass it into the header</p>
  
  <p><a href="https://i.stack.imgur.com/297jI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/297jI.png" alt="enter image description here"></a></p>
  
  <p><strong>Is it possible to pass a value into the header when running tests in the runner?</strong></p>
  
  <p>When running tests in the <strong>Runner</strong> the second request fails due to having an invalid <code>jwt</code>, and the Postman docs only show examples passing variables into the URL.</p>