Class Response


  • public class Response
    extends java.lang.Object
    HTTP response used by the fluent facade.
    Since:
    4.2
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean consumed  
      private org.apache.hc.core5.http.ClassicHttpResponse response  
    • 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 specified HttpClientResponseHandler
      Content returnContent()  
      org.apache.hc.core5.http.HttpResponse returnResponse()  
      void saveContent​(java.io.File file)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • response

        private final org.apache.hc.core5.http.ClassicHttpResponse response
      • consumed

        private boolean consumed
    • Constructor Detail

      • Response

        Response​(org.apache.hc.core5.http.ClassicHttpResponse response)
    • 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 specified HttpClientResponseHandler
        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