Class HttpResponse

    • Field Detail

      • response

        protected final org.apache.http.client.methods.CloseableHttpResponse response
    • Constructor Detail

      • HttpResponse

        protected HttpResponse​(org.apache.http.client.methods.CloseableHttpResponse response)
    • Method Detail

      • getStatus

        public int getStatus()
        Returns:
        the HTTP status code
      • getLocation

        public URI getLocation()
        Returns:
        the Location header value, if any
      • getType

        public String getType()
        Returns:
        the Content-Type header value, if any
      • getOptFirstHeader

        public Optional<String> getOptFirstHeader​(String headerName)
        Returns:
        the header value
      • getFirstHeader

        public String getFirstHeader​(String headerName)
        Returns:
        the header value, if any
      • getEntityString

        public String getEntityString()
        Returns:
        the entity body as String