function()
{
var headers = new Headers();
headers.append('Access-Control-Allow-Origin' , '*');
headers.append('Access-Control-Allow-Methods', 'POST, GET, OPTIONS, PUT');
headers.append('Accept','application/json');
headers.append('content-type','application/json');
let options = new RequestOptions({ headers:headers,withCredentials: true});
return this.http.post(this.url, postParams, options).do( res => console.log(res));
}
Hope, this will solve your issue