更新时间:2022-01-28 07:34:12
正如我在您的其他SO,不要使用 DELETE
而是使用 PUT
操作.
As I stated in your other SO, do not use a DELETE
but a PUT
operation.
深入HttpProducer
,如果methodToUse.isEntityEnclosed()
可以看到请求被填满> 是 true
(第 367 行).但是,这仅适用于 PUT
和 POST
,因为只有这些方法实现扩展了类 EntityEnclosureMethod
.不幸的是,DELETE
并非如此.
Digging into the source code of HttpProducer
, you can see that the request is filled if methodToUse.isEntityEnclosed()
is true
(line 367). However, this is only the case for PUT
and POST
as only those method implementations extend the class EntityEnclosingMethod
. Unfortunately for you, this is not the case for DELETE
.