title: Response for preflight does not have HTTP ok status in angular
body: <p>I have the following get request defined in my service:</p>
  
  <pre><code>createAuthorizationHeader(user, pass) {
    let headers: HttpHeaders = new HttpHeaders;
    headers = headers.append('Accept', 'application/json, text/plain, */*');
    headers = headers.append('Authorization', 'Basic ' + btoa(user + ':' + pass));
    headers = headers.append('Content-Type', 'application/json; charset=utf-8');
      console.log(headers);
      return this.http.get(this._loginUrl, {
        headers: headers
      });
  }
  </code></pre>
  
  <p>The result is:</p>
  
  <pre><code>OPTIONS https://localhost:8443/delivery/all 401 ()
  
  Failed to load https://localhost:8443/delivery/all: Response for preflight does not have HTTP ok status.
  
  HttpErrorResponse {headers: HttpHeaders, status: 0, statusText: "Unknown Error", url: null, ok: false, …}
  </code></pre>
  
  <p>I also have made the same post request with Postman, but everything works, so the local server works.</p>
  
  <p>I can't figure out what am I doing wrong with my request.</p>