Package org.springframework.web.client
Interface RestClient.RequestHeadersSpec.ConvertibleClientHttpResponse
- All Superinterfaces:
 AutoCloseable,ClientHttpResponse,Closeable,HttpInputMessage,HttpMessage
- Enclosing interface:
 - RestClient.RequestHeadersSpec<S extends RestClient.RequestHeadersSpec<S>>
 
public static interface RestClient.RequestHeadersSpec.ConvertibleClientHttpResponse
extends ClientHttpResponse
Extension of 
ClientHttpResponse that can convert the body.- 
Method Summary
Modifier and TypeMethodDescription<T> TExtract the response body as an object of the given type.<T> TbodyTo(ParameterizedTypeReference<T> bodyType) Extract the response body as an object of the given type.Methods inherited from interface org.springframework.http.client.ClientHttpResponse
close, getRawStatusCode, getStatusCode, getStatusTextMethods inherited from interface org.springframework.http.HttpInputMessage
getBodyMethods inherited from interface org.springframework.http.HttpMessage
getHeaders 
- 
Method Details
- 
bodyTo
Extract the response body as an object of the given type.- Type Parameters:
 T- the body type- Parameters:
 bodyType- the type of return value- Returns:
 - the body, or 
nullif no response body was available 
 - 
bodyTo
Extract the response body as an object of the given type.- Type Parameters:
 T- the body type- Parameters:
 bodyType- the type of return value- Returns:
 - the body, or 
nullif no response body was available 
 
 -