title: CORS : No 'Access-Control-Allow-Origin' header is present Angular 2
body: <p>I'm trying to implement a service that make a PATCH Http call, it's the only methode where i get this error " No 'Access-Control-Allow-Origin' header is present " and when i check the developper Tool on chrome i see an OPTION instead of PATCH, here is my methode :</p>
  
  <pre><code>pauseTasksJobs(id, task){
  
  //this.headers.append('Access-Control-Allow-Origin', 'application/json');
  //this.headers.append('Accept', 'application/json');
  
    var url = this.home+ "tasks/" +task+ "/jobs/" + id ;
    var body = "{  \" status \"  : \"Pause\" }";
    //var body = "{ status : Pause }";
     console.log("this is my body: "+body) 
  
     var result;
  
      this._http.patch(url,body,this.requestOption).
      map(res =&gt; res.json())
      .subscribe(res =&gt; {
                 result = res;
                console.log("this is my result: "+result);
      },  error=&gt; console.error('Error: ' + error),()=&gt;console.log("tasks mis en pause"));
  }
  </code></pre>
  
  <p>And in my constructor i'm setting the header content like this :</p>
  
  <pre><code>headers = new Headers();
   requestOption = new RequestOptions({ headers: this.headers });
  
    private actionV: string;
  
    constructor(private _http: Http) {
      this.headers.append('Content-Type', 'application/json');
      this.headers.append('Accept', 'application/json');
      this.headers.append('Authorization', 'Basic ' + cookieValue);
    }
  </code></pre>