我有以下内容:
[HttpDelete]
public HttpResponseMessage DeleteFolder(int[] ids)
{
我正在尝试使用它:
DELETE http://localhost:24144/api/folder/1483;
DELETE http://localhost:24144/api/folder/[1483]
但是这些在 delete 方法中显示为 null - 我如何发送数据而不将其放入正文中(因为这是一个 DELETE 请求)?
我的路由有这个:
routes.MapHttpRoute(
name: "Folder",
routeTemplate: "api/folder/{id}",
defaults: new { controller = "Folder", id = RouteParameter.Optional }
);