我发出了一个删除请求到服务器,就像这样:
@RequestMapping(value = "/user/{userId}", method = RequestMethod.DELETE)
针对单个用户进行删除操作很简单,但是如果有多个用户需要删除怎么办?我希望遵循REST架构,但不想通过发送多个删除请求的方式来实现。有没有其他的解决方式?
PS:这种方式可行吗:
@RequestMapping(value = "/user", method = RequestMethod.DELETE, headers = "Accept=application/json")
public void deleteUser(HttpServletResponse response, @RequestBody String users) throws IOException {
...
}
RequestMethod.DELETE
? - Tomasz Nurkiewicz