Closed
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