Class Response
java.lang.Object
org.apache.hc.client5.http.fluent.Response
HTTP response used by the fluent facade.
- Since:
- 4.2
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
Discards response content and deallocates all resources associated with it.private void
dispose()
<T> T
handleResponse
(org.apache.hc.core5.http.io.HttpClientResponseHandler<T> handler) Handles the response using the specifiedHttpClientResponseHandler
org.apache.hc.core5.http.HttpResponse
void
saveContent
(File file)
-
Field Details
-
response
private final org.apache.hc.core5.http.ClassicHttpResponse response -
consumed
private boolean consumed
-
-
Constructor Details
-
Response
Response(org.apache.hc.core5.http.ClassicHttpResponse response)
-
-
Method Details
-
assertNotConsumed
private void assertNotConsumed() -
dispose
- Throws:
IOException
-
discardContent
public void discardContent()Discards response content and deallocates all resources associated with it. -
handleResponse
public <T> T handleResponse(org.apache.hc.core5.http.io.HttpClientResponseHandler<T> handler) throws IOException Handles the response using the specifiedHttpClientResponseHandler
- Throws:
IOException
-
returnContent
- Throws:
IOException
-
returnResponse
- Throws:
IOException
-
saveContent
- Throws:
IOException
-