org.springframework.web.client
Class RestTemplate.AcceptHeaderRequestCallback

java.lang.Object
  extended by org.springframework.web.client.RestTemplate.AcceptHeaderRequestCallback
All Implemented Interfaces:
RequestCallback
Direct Known Subclasses:
RestTemplate.HttpEntityRequestCallback
Enclosing class:
RestTemplate

private class RestTemplate.AcceptHeaderRequestCallback
extends java.lang.Object
implements RequestCallback

Request callback implementation that prepares the request's accept headers.


Field Summary
private  java.lang.Class<?> responseType
           
 
Constructor Summary
private RestTemplate.AcceptHeaderRequestCallback(java.lang.Class<?> responseType)
           
 
Method Summary
 void doWithRequest(ClientHttpRequest request)
          Gets called by RestTemplate.execute(java.lang.String, org.springframework.http.HttpMethod, org.springframework.web.client.RequestCallback, org.springframework.web.client.ResponseExtractor, java.lang.Object...) with an opened ClientHttpRequest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

responseType

private final java.lang.Class<?> responseType
Constructor Detail

RestTemplate.AcceptHeaderRequestCallback

private RestTemplate.AcceptHeaderRequestCallback(java.lang.Class<?> responseType)
Method Detail

doWithRequest

public void doWithRequest(ClientHttpRequest request)
                   throws java.io.IOException
Description copied from interface: RequestCallback
Gets called by RestTemplate.execute(java.lang.String, org.springframework.http.HttpMethod, org.springframework.web.client.RequestCallback, org.springframework.web.client.ResponseExtractor, 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.

Specified by:
doWithRequest in interface RequestCallback
Parameters:
request - the active HTTP request
Throws:
java.io.IOException - in case of I/O errors