private class RestTemplate.HttpEntityRequestCallback extends RestTemplate.AcceptHeaderRequestCallback
| Modifier and Type | Field and Description |
|---|---|
private HttpEntity<?> |
requestEntity |
| Modifier | Constructor and Description |
|---|---|
private |
HttpEntityRequestCallback(java.lang.Object requestBody) |
private |
HttpEntityRequestCallback(java.lang.Object requestBody,
java.lang.reflect.Type responseType) |
| Modifier and Type | Method and Description |
|---|---|
void |
doWithRequest(ClientHttpRequest httpRequest)
|
private final HttpEntity<?> requestEntity
private HttpEntityRequestCallback(java.lang.Object requestBody)
private HttpEntityRequestCallback(java.lang.Object requestBody,
java.lang.reflect.Type responseType)
public void doWithRequest(ClientHttpRequest httpRequest) throws java.io.IOException
RequestCallbackRestTemplate.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 RequestCallbackdoWithRequest in class RestTemplate.AcceptHeaderRequestCallbackhttpRequest - the active HTTP requestjava.io.IOException - in case of I/O errors