-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed as not planned
Labels
for: external-projectFor an external project and not something we can fixFor an external project and not something we can fixstatus: duplicateA duplicate of another issueA duplicate of another issue
Description
Hey, after updating our micro-service that used Spring 3.5.0 to Spring 3.5.3 sending DELETE requests with bodies has stopped working. The service on the receiving end is receiving the request without the body. The only change between the scenarios is the Spring version on the service that sent the request.
The code for sending the request:
protected <T, K> boolean sendDeleteRequest(String url, T requestBody, ParameterizedTypeReference<K> responseType) {
boolean retVal = false;
HttpEntity<T> httpEntity = new HttpEntity<>(requestBody);
try {
ResponseEntity<K> result = restTemplate.exchange(
url,
HttpMethod.DELETE,
httpEntity,
responseType
);
if (result.getStatusCode().is2xxSuccessful()) {
log.debug("Successfully sent DELETE request to: {}", url);
retVal = true;
} else {
String errorMessage = String.format("Error while sending DELETE request to: %s, response: %s",
url, result.getStatusCode());
log.error(errorMessage);
}
} catch (Exception ex) {
log.error("Error while sending DELETE request to: {}", url, ex);
}
return retVal;
}
Where restTemplate is: org.springframework.web.client.RestTemplate.
Has something changed between 3.5.0 to 3.5.3 in that sense? I haven't noticed this in the changelog.
Metadata
Metadata
Assignees
Labels
for: external-projectFor an external project and not something we can fixFor an external project and not something we can fixstatus: duplicateA duplicate of another issueA duplicate of another issue