Package it.unimi.dsi.law.warc.util
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 Summary
Fields Modifier and Type Field Description static String
DIGEST_HEADER
The WARCanvl-filed
name to store the digest.static String
GUESSED_CHARSET_HEADER
The WARCanvl-filed
name to store the charset recognized during parsing.static Charset
HEADER_CHARSET
TheCharset
used to encode/decode the HTTP headers.static String
ISDUPLICATE_HEADER
The WARCanvl-filed
name to store the digest. -
Method Summary
Modifier and Type Method Description MeasurableInputStream
contentAsStream()
Returns the content of this response as a stream.Map<String,String>
headers()
Returns the headers of this response.int
status()
Returns the response status.org.apache.http.StatusLine
statusLine()
Returns the response status line.Methods inherited from interface it.unimi.dsi.law.warc.util.Response
fromWarcRecord, uri
-
Field Details
-
GUESSED_CHARSET_HEADER
The WARCanvl-filed
name to store the charset recognized during parsing.- See Also:
- Constant Field Values
-
DIGEST_HEADER
The WARCanvl-filed
name to store the digest.- See Also:
- Constant Field Values
-
ISDUPLICATE_HEADER
The WARCanvl-filed
name to store the digest.- See Also:
- Constant Field Values
-
HEADER_CHARSET
TheCharset
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
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
orHttpHeaders
to avoid typing and casing mistakes.- Returns:
- the headers of this response.
-
contentAsStream
Returns the content of this response as a stream.- Returns:
- the content of this response as a stream.
- Throws:
IOException
-