public class ContentResponseHandler extends AbstractHttpClientResponseHandler<Content>
Content| Constructor and Description |
|---|
ContentResponseHandler() |
| Modifier and Type | Method and Description |
|---|---|
Content |
handleEntity(HttpEntity entity)
Handle the response entity and transform it into the actual response
object.
|
Content |
handleResponse(ClassicHttpResponse response)
Handles a successful response (2xx status code) and returns the response entity as a
Content object. |
public Content handleEntity(HttpEntity entity) throws IOException
AbstractHttpClientResponseHandlerhandleEntity in class AbstractHttpClientResponseHandler<Content>IOExceptionpublic Content handleResponse(ClassicHttpResponse response) throws IOException
Content object.
If no response entity exists, Content.NO_CONTENT is returned.handleResponse in interface HttpClientResponseHandler<Content>handleResponse in class AbstractHttpClientResponseHandler<Content>response - the HTTP response.Content object that encapsulates the response body, or Content.NO_CONTENT if the
response body is null or has zero length.HttpResponseException - if the response was unsuccessful (status code greater than 300).IOException - if an I/O error occurs.Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.