How to add a body to Angular HttpClient delete function

前端 未结 3 1183
孤独总比滥情好
孤独总比滥情好 2021-01-01 08:46

Our project is migrating to Angular4, and use @angular/common/http Httpclient as the default network tool. But I found there are no body p

3条回答
  •  情深已故
    2021-01-01 09:05

    You may use a universal request method on the HttpClient class instead. This method has the body in options. https://angular.io/api/common/http/HttpClient#members

    e.g this.http.request('delete', 'url', { body: ... })

提交回复
热议问题