> For the complete documentation index, see [llms.txt](https://potoyang.gitbook.io/spring-in-action-v5/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://potoyang.gitbook.io/spring-in-action-v5/di-11-zhang-kai-fa-xiang-ying-shi-api/11.4-xiang-ying-shi-xiao-fei-rest-api/11.4.3-shan-chu-zi-yuan.md).

# 11.4.3 删除资源

WebClient 还允许使用 delete() 方法删除资源。例如，下面的代码通过给定的 ID 删除 Ingredient 对象：

```java
Mono<Void> result = webClient
    .delete()
    .uri("/ingredients/{id}", ingredientId)
    .retrieve()
    .bodyToMono(Void.class)
    .subscribe();
```

和 PUT 请求一样，DELETE 请求通常没有响应体。同样，返回并订阅 Mono 以发送请求。
