org.apache.hc.client5.http.fluent

## Class Response

- java.lang.Object
- - org.apache.hc.client5.http.fluent.Response

-     public class Response
      extends Object

  HTTP response used by the fluent facade.
  Since:
    4.2

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `discardContent()` Discards response content and deallocates all resources associated with it.
    `<T> T` | `handleResponse(org.apache.hc.core5.http.io.HttpClientResponseHandler<T> handler)` Handles the response using the specified `HttpClientResponseHandler`
    `Content` | `returnContent()`
    `org.apache.hc.core5.http.HttpResponse` | `returnResponse()`
    `void` | `saveContent(File file)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### 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 specified `HttpClientResponseHandler`
      Throws:
        `IOException`

    - #### returnContent

          public Content returnContent()
                                throws IOException

      Throws:
        `IOException`

    - #### returnResponse

          public org.apache.hc.core5.http.HttpResponse returnResponse()
                                                               throws IOException

      Throws:
        `IOException`

    - #### saveContent

          public void saveContent(File file)
                           throws IOException

      Throws:
        `IOException`

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.