Class Response
- java.lang.Object
-
- org.apache.hc.client5.http.fluent.Response
-
public class Response extends java.lang.Object
HTTP response used by the fluent facade.- Since:
- 4.2
-
-
Constructor Summary
Constructors Constructor Description Response(org.apache.hc.core5.http.ClassicHttpResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
assertNotConsumed()
void
discardContent()
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
Content
returnContent()
org.apache.hc.core5.http.HttpResponse
returnResponse()
void
saveContent(java.io.File file)
-
-
-
Method Detail
-
assertNotConsumed
private void assertNotConsumed()
-
dispose
private void dispose() throws java.io.IOException
- Throws:
java.io.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 java.io.IOException
Handles the response using the specifiedHttpClientResponseHandler
- Throws:
java.io.IOException
-
returnContent
public Content returnContent() throws java.io.IOException
- Throws:
java.io.IOException
-
returnResponse
public org.apache.hc.core5.http.HttpResponse returnResponse() throws java.io.IOException
- Throws:
java.io.IOException
-
saveContent
public void saveContent(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
-