Class HttpRequestor.Response

  • Enclosing class:
    HttpRequestor

    public static final class HttpRequestor.Response
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Response​(int statusCode, java.io.InputStream body, java.util.Map<java.lang.String,​? extends java.util.List<java.lang.String>> headers)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream getBody()
      Returns an InputStream for reading the HTTP response body.
      java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaders()
      Returns a case-insensitive, unmodifiable mapping of header fields to their values.
      int getStatusCode()
      Returns HTTP status response code.
      • Methods inherited from class java.lang.Object

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

      • Response

        public Response​(int statusCode,
                        java.io.InputStream body,
                        java.util.Map<java.lang.String,​? extends java.util.List<java.lang.String>> headers)
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Returns HTTP status response code.
        Returns:
        HTTP status code
      • getBody

        public java.io.InputStream getBody()
        Returns an InputStream for reading the HTTP response body.

        The returned stream must be fully read before closing.

        Returns:
        HTTP response body
      • getHeaders

        public java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaders()
        Returns a case-insensitive, unmodifiable mapping of header fields to their values.
        Returns:
        case-insensitive, unmodifiable headers