private static class RestTemplateXhrTransport.XhrRequestCallback extends java.lang.Object implements RequestCallback
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
body |
private HttpHeaders |
headers |
| Constructor and Description |
|---|
XhrRequestCallback(HttpHeaders headers) |
XhrRequestCallback(HttpHeaders headers,
java.lang.String body) |
| Modifier and Type | Method and Description |
|---|---|
void |
doWithRequest(ClientHttpRequest request)
|
private final HttpHeaders headers
private final java.lang.String body
public XhrRequestCallback(HttpHeaders headers)
public XhrRequestCallback(HttpHeaders headers, java.lang.String body)
public void doWithRequest(ClientHttpRequest request) 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 RequestCallbackrequest - the active HTTP requestjava.io.IOException - in case of I/O errors