private class RestTemplate.AcceptHeaderRequestCallback extends java.lang.Object implements RequestCallback
Modifier and Type | Field and Description |
---|---|
private java.lang.Class<?> |
responseType |
Modifier | Constructor and Description |
---|---|
private |
RestTemplate.AcceptHeaderRequestCallback(java.lang.Class<?> responseType) |
Modifier and Type | Method and Description |
---|---|
void |
doWithRequest(ClientHttpRequest request)
|
private RestTemplate.AcceptHeaderRequestCallback(java.lang.Class<?> 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 errors