private class RestTemplate.AcceptHeaderRequestCallback extends java.lang.Object implements RequestCallback
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Type |
responseType |
Modifier | Constructor and Description |
---|---|
private |
AcceptHeaderRequestCallback(java.lang.reflect.Type responseType) |
Modifier and Type | Method and Description |
---|---|
void |
doWithRequest(ClientHttpRequest request)
|
private java.util.List<MediaType> |
getSupportedMediaTypes(HttpMessageConverter<?> messageConverter) |
@Nullable private final java.lang.reflect.Type responseType
private AcceptHeaderRequestCallback(@Nullable java.lang.reflect.Type responseType)
public void doWithRequest(ClientHttpRequest request) throws java.io.IOException
RequestCallback
RestTemplate.execute(java.lang.String, org.springframework.http.HttpMethod, org.springframework.web.client.RequestCallback, org.springframework.web.client.ResponseExtractor<T>, java.lang.Object...)
with an opened ClientHttpRequest
.
Does not need to care about closing the request or about handling errors:
this will all be handled by the RestTemplate
.doWithRequest
in interface RequestCallback
request
- the active HTTP requestjava.io.IOException
- in case of I/O errorsprivate java.util.List<MediaType> getSupportedMediaTypes(HttpMessageConverter<?> messageConverter)