title: Refused to set unsafe header "Access-Control-Request-Headers" Angular 4
body: <p>I am getting next error in my console:</p>
  
  <p>Refused to set unsafe header "Access-Control-Request-Headers".</p>
  
  <p>I have the next code:</p>
  
  <pre><code>     import { Component } from '@angular/core';
  import { Http, Headers, RequestOptions, Response } from '@angular/http';
  import { getLocaleDateFormat } from '@angular/common';
  // import 'rxjs/Rx';
   // import 'rxjs/add/operator/map';
  import { map } from "rxjs/operators";
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent {
    title = 'app works!!';
    private apiUrl = 'http://testserver:8083/feedback_api/2/token';
    data: any = {};
  
    constructor(private http: Http) {
      console.log('TEST');
      this.getContact();
      this.getData();
    }
  
  
    getData() {
          // add authorization header with jwt token
          let headers = new Headers({ 'Access-Control-Request-Headers': 'Authorization' });
       //   headers.append('Access-Control-Request-Headers', 'Authorization');
          headers.append('Access-Control-Allow-Origin', '*');
          // headers.append('Access-Control-Allow-Headers', 'Content-Type');
          headers.append('Authorization', 'Basic exampletokenexampletokenexampletoken');
          // 'Authorization': 'Basic exampletokenexampletokenexampletoken'
          headers.append("Content-Type", "application/x-www-form-urlencoded");
          //headers.append('Content-Type', 'application/json');
          //headers.append('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
  
          let options = new RequestOptions({ headers: headers });
  
          console.log(headers);
  
          // get users from api
          return this.http.get(this.apiUrl, options)
              .pipe(map((response: Response) =&gt; response.json()));
      }
    getContact() {
     this.getData().subscribe(data =&gt; {
    console.log(data);
    this.data = data
  })
  
  
    }
  }
  </code></pre>
  
  <p>When I use Postman and send a request to the server through the api, I am getting json response back => in headers I am sending a key: "Autorization" and value: "tokenexample".
  My app is running on the localhost.
  Can you help me please with this?</p>