public interface Response
extends org.apache.http.client.methods.CloseableHttpResponse
| Modifier and Type | Method and Description |
|---|---|
default org.apache.http.entity.ContentType |
getContentType() |
default int |
getStatusCode() |
URI |
getURI() |
default boolean |
hasEntity() |
default boolean |
isNonSuccess() |
default boolean |
isSuccess() |
<T> T |
readEntity(Class<T> responseType)
Read the entity input stream as an instance of specified Java type using a
ResponseBodyReader. |
<T> T |
readEntity(TypeReference<T> responseType)
Read the entity input stream as an instance of specified Java type using a
ResponseBodyReader. |
<T> T |
readEntityChecked(Class<T> responseType)
Read the entity input stream as an instance of specified Java type using a
ResponseBodyReader. |
<T> T |
readEntityChecked(TypeReference<T> responseType)
Read the entity input stream as an instance of specified Java type using a
ResponseBodyReader. |
getEntity, getLocale, getStatusLine, setEntity, setLocale, setReasonPhrase, setStatusCode, setStatusLine, setStatusLine, setStatusLine<T> T readEntity(Class<T> responseType)
ResponseBodyReader.
Note: method will throw any unchecked exception which will occurred in specified ResponseBodyReader.
T - response entity type.responseType - Java type the response entity will be converted to.ResponseBodyProcessingException - when body processing failed.<T> T readEntity(TypeReference<T> responseType)
ResponseBodyReader.
Note: method will throw any unchecked exception which will occurred in specified ResponseBodyReader.
T - response entity type.responseType - Java type the response entity will be converted to.ResponseBodyProcessingException - when body processing failed.@Beta <T> T readEntityChecked(Class<T> responseType) throws IOException
ResponseBodyReader.
Note: method will throw any unchecked exception which will occurred in specified ResponseBodyReader.
T - response entity type.responseType - Java type the response entity will be converted to.IOException - If the stream could not be created or error occurs reading the input stream.ResponseBodyReaderException - If Cannot deserialize content@Beta <T> T readEntityChecked(TypeReference<T> responseType) throws IOException
ResponseBodyReader.
Note: method will throw any unchecked exception which will occurred in specified ResponseBodyReader.
T - response entity type.responseType - Java type the response entity will be converted to.IOException - If the stream could not be created or error occurs reading the input stream.ResponseBodyReaderException - If Cannot deserialize contentURI getURI()
default boolean hasEntity()
default org.apache.http.entity.ContentType getContentType()
default int getStatusCode()
default boolean isSuccess()
default boolean isNonSuccess()
Copyright © 2021. All rights reserved.