title: Set response header along with a string
body: <p>I am trying to send the token in the headers of an HTTP request from backend to the frontend along with sending my own defined string. However, I am getting an issue. The token is being printed as null on the client-side. I don't know why:</p>
  <p>Here's my code:</p>
  <blockquote>
  <p>Node/Express</p>
  </blockquote>
  <pre><code>if (bcrypt.compareSync(passcode, results[0].password))
  {
       const token = jwt.sign({id: email}, secret, {expiresIn: 86400 });
       console.log(token);
       if(results[0].userrights == 'full')
         {
            res.setHeader('x-access-token', token);
            res.send(&quot;Full Authorization&quot;);
         }
  
      //rest of the code
   }
  </code></pre>
  <blockquote>
  <p>Angular</p>
  </blockquote>
  <pre><code>this.http.post('http://localhost:3000/api/login', form.value, {responseType: &quot;text&quot;, observe: 
                  'response'})
    .subscribe(responseData =&gt; {
      console.log(responseData);
      console.log(responseData.headers.get('x-access-token'));  //prints null on the console
  </code></pre>
  <p>I have searched quite a bit and found different examples which is making it very confusing. I don't want to use response status rather my own defined string. I have tried different things to print the variable but it still is throwing as null.</p>