Body of Http.DELETE request in Angular2

前端 未结 12 1998
旧巷少年郎
旧巷少年郎 2020-12-02 08:23

I\'m trying to talk to a somewhat RESTful API from an Angular 2 frontend.

To remove some item from a collection, I need to send some other data in addition to the re

12条回答
  •  半阙折子戏
    2020-12-02 09:29

    Definition in http.js from the @angular/http:

    delete(url, options)

    The request doesn't accept a body so it seem your only option is to but your data in the URI.

    I found another topic with references to correspond RFC, among other things: How to pass data in the ajax DELETE request other than headers

提交回复
热议问题