【发布时间】:2016-08-16 09:07:39
【问题描述】:
我遵循 Angular2 tutorial 但 Http.delete 总是抛出异常:
TypeError: this._body is null
hero.service.ts 原代码
public deleteHero(hero: Hero) {
const headers = new Headers({
'Content-Type': 'application/json'
});
return this._http
.delete(this._heroesUrl + "/" + hero.Id, { headers: headers })
.toPromise()
.catch(this.handleError);
}
【问题讨论】:
标签: angular rxjs angular2-http