title: How to correctly set Http Request Header in Angular 2
body: <p>I have an Ionic 2 application using Angular 2, which is sending an Http PUT to a ASP.NET Core API server. Here's the method I'm using to send the request:</p>
  
  <pre class="lang-ts prettyprint-override"><code>public update(student: Student): Promise&lt;Student&gt;
  {
      let headers = new Headers();
      headers.append('Content-Type', 'application/json');
      headers.append('authentication', `${student.token}`);
  
      const url = `${this.studentsUrl}`;
  
      return this.http
          .put(url, JSON.stringify(student), { headers: headers })
          .toPromise()
          .then(() =&gt; student)
          .catch(this.handleError);
  }
  </code></pre>
  
  <p>I'm setting an authentication key/value on the headers object.</p>
  
  <p>But when I receive this request on the server, I cannot find the authentication key on the header:</p>
  
  <p><a href="https://i.stack.imgur.com/Br0nO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Br0nO.png" alt="enter image description here"></a></p>
  
  <p>As you can see in the picture, there are many keys on the header, but not the content and authentication keys that I manually added to the header in the client application.</p>
  
  <p>What am I doing wrong?</p>