-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Graham Zabel opened SPR-5836 and commented
Hi,
Using RestTemplate, the only way to execute a POST and process the response is to use execute() providing custom Callback and Extractor classes, which seems to be very elaborate. Could we have a new convenience method, perhaps postForObject() that does something like this:
public <R> R postForObject(String url, Object request, Class<R> responseType) throws RestClientException {
return execute(url, HttpMethod.POST,
new PostPutCallback(request), new HttpMessageConverterExtractor<R>(responseType));
}
thanks,
Graham
Affects: 3.0 M3
Referenced from: commits ddcd9f4
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement