Class HttpResponse

    • Constructor Detail

      • HttpResponse

        public HttpResponse​(int _code,
                            Map<String,​String> _headers,
                            InputStream _rawBody)
        Parameters:
        _code - The HTTP status code
        _headers - The HTTP headers read from response
        _rawBody - The raw data returned by the HTTP request
      • HttpResponse

        public HttpResponse​(int _code,
                            Map<String,​String> _headers,
                            InputStream _rawBody,
                            org.apache.http.client.methods.HttpRequestBase _baseReq)
        Parameters:
        _code - The HTTP status code
        _headers - The HTTP headers read from response
        _rawBody - The raw data returned by the HTTP request
        _baseReq - The underlying http base request from the apache http library
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        HTTP Status code of the http response
        Returns:
        the HTTP status code
      • getHeaders

        public Map<String,​String> getHeaders()
        Headers of the http response
        Returns:
        the HTTP response headers
      • getRawBody

        public InputStream getRawBody()
        Raw body of the http response
        Returns:
        the raw HTTP body
      • shutdown

        public void shutdown()
        Shutdowns any pending http resources e.g., input streams and realses connection