接口的使用
org.springframework.web.client.RequestCallback
使用RequestCallback的程序包 程序包 说明 org.springframework.web.client Core package of the client-side web support.org.springframework.web.client中RequestCallback的使用
返回RequestCallback的org.springframework.web.client中的方法 修饰符和类型 方法 说明 <T> RequestCallback
RestTemplate. acceptHeaderRequestCallback(Class<T> responseType)
Return aRequestCallback
that sets the requestAccept
header based on the given response type, cross-checked against the configured message converters.<T> RequestCallback
RestTemplate. httpEntityCallback(Object requestBody)
Return aRequestCallback
implementation that writes the given object to the request stream.<T> RequestCallback
RestTemplate. httpEntityCallback(Object requestBody, Type responseType)
Return aRequestCallback
implementation that: Sets the requestAccept
header based on the given response type, cross-checked against the configured message converters.参数类型为RequestCallback的org.springframework.web.client中的方法 修饰符和类型 方法 说明 protected <T> T
RestTemplate. doExecute(URI url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor)
Execute the given method on the provided URI.<T> T
RestOperations. execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Object... uriVariables)
Execute the HTTP method to the given URI template, preparing the request with theRequestCallback
, and reading the response with aResponseExtractor
.<T> T
RestOperations. execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Map<String,?> uriVariables)
Execute the HTTP method to the given URI template, preparing the request with theRequestCallback
, and reading the response with aResponseExtractor
.<T> T
RestOperations. execute(URI url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor)
Execute the HTTP method to the given URL, preparing the request with theRequestCallback
, and reading the response with aResponseExtractor
.<T> T
RestTemplate. execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Object... uriVariables)
Execute the HTTP method to the given URI template, preparing the request with theRequestCallback
, and reading the response with aResponseExtractor
.<T> T
RestTemplate. execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Map<String,?> uriVariables)
Execute the HTTP method to the given URI template, preparing the request with theRequestCallback
, and reading the response with aResponseExtractor
.<T> T
RestTemplate. execute(URI url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor)
Execute the HTTP method to the given URL, preparing the request with theRequestCallback
, and reading the response with aResponseExtractor
.