title: Refused to set unsafe header "access-control-request-headers" angular 2
body: <p>I'm trying to send HTTP POST to the my server, I do it in this way: </p>
  
  <pre><code>var headers = new Headers({ 'Access-Control-Request-Headers': "Content-Type", 'Content-Type': 'application/json'});
  let options = new RequestOptions({ headers: headers });
  console.log(JSON.stringify(library) + " " + SERVER + "/library");
  this.http.post(SERVER + "/library", JSON.stringify(library), options)
    .subscribe(data =&gt; {console.log(data.json())});
  </code></pre>
  
  <p>but I'm getting <code>Refused to set unsafe header "access-control-request-headers"</code> error. If I'm sending POST without <code>'Access-Control-Request-Headers': "Content-Type"</code> I'm getting <code>Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response</code>. Does anyone know how to solve this problem? Thank in advance.</p>