title: How to set headers to application/json in Angular 2
body: <p>I am trying to send HTTP post request in Angular 2 but not able to set headers to content type application JSON.</p>
  <p><strong>My code is:</strong></p>
  <pre><code>login(url,postdata)
  {
      var headers = new Headers({'Content-Type': 'application/json'});
      return this._http.post(url,JSON.stringify(postdata),this.headers)
      .map(res =&gt; res.json())    
  }
  </code></pre>
  <p>When I checked in network I found that <code>Content-Type</code> is set as <code>text/plain</code> and thus server is not receiving any data.
  Any suggestions will be appreciated.</p>