Angular2获取请求正常但发布请求给我错误。这是我的请求
url = environment.API + "products/";
headers = new Headers({ 'Content-Type': 'application/json' });
options = new RequestOptions({ headers: this.headers });
constructor(private http:Http) {
}
getProductsList(data): Promise<any> {
return this.http.post(this.url+'getproductsbyfilters', JSON.stringify(data), this.options).toPromise()
.then(this.extractData)
.catch(this.handleErrorPromise);
}