public class HttpResponse extends java.lang.Object implements Response
| Modifier and Type | Class and Description |
|---|---|
protected static class |
HttpResponse.Scheme |
CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_TYPE, LAST_MODIFIED, LOCATION, TRANSFER_ENCODING| Constructor and Description |
|---|
HttpResponse(HttpBase http,
java.net.URL url,
WebPage page) |
| Modifier and Type | Method and Description |
|---|---|
int |
getCode()
Returns the response code.
|
byte[] |
getContent()
Returns the full content of the response.
|
java.lang.String |
getHeader(java.lang.String name)
Returns the value of a named header.
|
Metadata |
getHeaders()
Returns all the headers.
|
java.net.URL |
getUrl()
Returns the URL used to retrieve this response.
|
public HttpResponse(HttpBase http, java.net.URL url, WebPage page) throws ProtocolException, java.io.IOException
ProtocolExceptionjava.io.IOExceptionpublic java.net.URL getUrl()
Responsepublic int getCode()
Responsepublic java.lang.String getHeader(java.lang.String name)
Responsepublic Metadata getHeaders()
ResponsegetHeaders in interface Responsepublic byte[] getContent()
ResponsegetContent in interface ResponseCopyright © 2019 The Apache Software Foundation