Class HttpEntityHandler


  • public class HttpEntityHandler
    extends Object
    Handles retrieving an Entity from an HttpResponse while validating resulting status codes.
    Author:
    Jeremy Unruh
    • Constructor Detail

      • HttpEntityHandler

        public HttpEntityHandler()
    • Method Detail

      • closeQuietly

        public static void closeQuietly​(HttpResponse response)
        Closes an HttpResponse ignoring a possible IOException
        Parameters:
        response - the http response
      • statusAndClose

        public static int statusAndClose​(HttpResponse response)
        Returns the status code and closes the response
        Parameters:
        response - the http response
        Returns:
        the status code