use of org.springframework.web.client.RequestCallback in project java-chassis by ServiceComb.
the class CseRestTemplate method patchForObject.
// PUT
// no override
// PATCH
@Override
@Nullable
public <T> T patchForObject(String url, @Nullable Object request, Class<T> responseType, Object... uriVariables) throws RestClientException {
RequestCallback requestCallback = httpEntityCallback(request, responseType);
CseHttpMessageConverterExtractor<T> responseExtractor = new CseHttpMessageConverterExtractor<>();
return execute(url, HttpMethod.PATCH, requestCallback, responseExtractor, uriVariables);
}
use of org.springframework.web.client.RequestCallback in project java-chassis by ServiceComb.
the class CseRestTemplate method patchForObject.
@Override
@Nullable
public <T> T patchForObject(String url, @Nullable Object request, Class<T> responseType, Map<String, ?> uriVariables) throws RestClientException {
RequestCallback requestCallback = httpEntityCallback(request, responseType);
CseHttpMessageConverterExtractor<T> responseExtractor = new CseHttpMessageConverterExtractor<>();
return execute(url, HttpMethod.PATCH, requestCallback, responseExtractor, uriVariables);
}
use of org.springframework.web.client.RequestCallback in project java-chassis by ServiceComb.
the class CseRestTemplate method postForObject.
@Override
@Nullable
public <T> T postForObject(URI url, @Nullable Object request, Class<T> responseType) throws RestClientException {
RequestCallback requestCallback = httpEntityCallback(request, responseType);
CseHttpMessageConverterExtractor<T> responseExtractor = new CseHttpMessageConverterExtractor<>();
return execute(url, HttpMethod.POST, requestCallback, responseExtractor);
}
use of org.springframework.web.client.RequestCallback in project java-chassis by ServiceComb.
the class CseRestTemplate method postForObject.
@Override
@Nullable
public <T> T postForObject(String url, @Nullable Object request, Class<T> responseType, Map<String, ?> uriVariables) throws RestClientException {
RequestCallback requestCallback = httpEntityCallback(request, responseType);
CseHttpMessageConverterExtractor<T> responseExtractor = new CseHttpMessageConverterExtractor<>();
return execute(url, HttpMethod.POST, requestCallback, responseExtractor, uriVariables);
}
use of org.springframework.web.client.RequestCallback in project java-chassis by ServiceComb.
the class CseRestTemplate method getForObject.
@Override
@Nullable
public <T> T getForObject(URI url, Class<T> responseType) throws RestClientException {
RequestCallback requestCallback = acceptHeaderRequestCallback(responseType);
CseHttpMessageConverterExtractor<T> responseExtractor = new CseHttpMessageConverterExtractor<>();
return execute(url, HttpMethod.GET, requestCallback, responseExtractor);
}
Aggregations