Interface HttpResponse

All Superinterfaces:
Response
All Known Implementing Classes:
AbstractHttpResponse, HttpComponentsHttpResponse, MetadataHttpResponse, MutableHttpResponse, WarcHttpResponse

public interface HttpResponse
extends Response
Provides high level access to WARC records with record-type equal to response and content-type equal to HTTP (or HTTPS).
  • Field Details

    • GUESSED_CHARSET_HEADER

      static final String GUESSED_CHARSET_HEADER
      The WARC anvl-filed name to store the charset recognized during parsing.
      See Also:
      Constant Field Values
    • DIGEST_HEADER

      static final String DIGEST_HEADER
      The WARC anvl-filed name to store the digest.
      See Also:
      Constant Field Values
    • ISDUPLICATE_HEADER

      static final String ISDUPLICATE_HEADER
      The WARC anvl-filed name to store the digest.
      See Also:
      Constant Field Values
    • HEADER_CHARSET

      static final Charset HEADER_CHARSET
      The Charset used to encode/decode the HTTP headers.
  • Method Details

    • status

      int status()
      Returns the response status.
      Returns:
      the status of this response.
    • statusLine

      org.apache.http.StatusLine statusLine()
      Returns the response status line.
      Returns:
      the status line of this response.
    • headers

      Map<String,​String> headers()
      Returns the headers of this response.

      Warning: as of LAW 3.0, and contrarily to previous behaviour, the map is case-sensitive. Use the predefined names in HttpHeaders or HttpHeaders to avoid typing and casing mistakes.

      Returns:
      the headers of this response.
    • contentAsStream

      MeasurableInputStream contentAsStream() throws IOException
      Returns the content of this response as a stream.
      Returns:
      the content of this response as a stream.
      Throws:
      IOException