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.- Since:
- 6.1
- Author:
- Arjen Poutsma, Sebastien Deleuze
-
Method Summary
Methods inherited from interface org.springframework.http.client.ClientHttpResponse
close, getStatusCode, getStatusTextMethods inherited from interface org.springframework.http.HttpInputMessage
getBodyMethods inherited from interface org.springframework.http.HttpMessage
getHeaders
-
Method Details
-
bodyTo
-
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
-