你好,我在另一个浏览器中有一个角度为2的http请求,但工作正常,但只有IE和Edge无法正常工作,并且出现415 http代码错误
headers = new Headers({'Content-Type': 'application/json'});
getJson(params): Promise<any[]> {
params = JSON.stringify(params);
let opts = new RequestOptions({
headers: this.headers,
withCredentials: true
});
return this.http.post(this.host + "save_info",params ,opts)
.toPromise()
.then(response => response.json())
.catch(this.handleError);
}