-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Brad Cupit opened SPR-8572 and commented
when calling RestTemplate.exchange() I should be able to use a Void response type. Example (notice the last parameter):
restTemplate.exchange(webServiceUrl, HttpMethod.DELETE, null, Void.class);
The Void class implies no return entity and reads a little better than null for the response type.
The fix should be trivial. In RestTemplate.ResponseEntityResponseExtractor's constructor, just change this line:
if (responseType != null)
to this:
if (responseType != null && responseType != Void.class)
Affects: 3.0.5
Referenced from: commits c472a16
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement