You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for DELETE with body to AsyncRestTemplate [SPR-12291] #16896
When making a DELETE request with a non empty request body using an AsyncRestClient with the default options (created with a AsyncClientHttpRequestFactory parameter, obtained using default configurations of for HttpAsyncClientBuilder) , the body is not actually attached to the request.
public <T> ListenableFuture<ResponseEntity<T>> exchange(String url, HttpMethod.DELETE, HttpEntity<?> requestEntity, Class<T> responseType, Map<String, ?> uriVariables) , where requestEntity.body is not null or empty.
That said, if a body has been specified, (Async)RestTemplate arguably shouldn't simply ignore it but rather follow the caller's intention and pass it on.
Activity
spring-projects-issues commentedon Oct 2, 2014
Juergen Hoeller commented
The use of a body with a DELETE request is generally questionable, e.g. following this discussion:
http://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request
That said, if a body has been specified, (Async)RestTemplate arguably shouldn't simply ignore it but rather follow the caller's intention and pass it on.
Juergen
spring-projects-issues commentedon Oct 2, 2014
Juergen Hoeller commented
According to the following discussion, the limitation is actually in HttpURLConnection and Apache HttpComponents:
http://knowledgebrowse.blogspot.com/2013/08/spring-resttemplate-calling-delete.html
spring-projects-issues commentedon Oct 27, 2014
Rossen Stoyanchev commented
This should now be resolved due to #16966.