public class Http extends HttpBase
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOG |
accept, acceptCharset, acceptLanguage, BUFFER_SIZE, maxContent, proxyHost, proxyPort, responseTime, timeout, tlsPreferredCipherSuites, tlsPreferredProtocols, useHttp11, useProxy, userAgentCHECK_BLOCKING, CHECK_ROBOTS, X_POINT_ID| Constructor and Description |
|---|
Http()
Constructs this plugin.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<WebPage.Field> |
getFields() |
protected Response |
getResponse(java.net.URL url,
WebPage page,
boolean redirect)
Fetches the
url with a configured HTTP client and gets the
response. |
static void |
main(java.lang.String[] args)
Main method.
|
void |
setConf(Configuration conf)
Reads the configuration from the Nutch configuration files and sets the
configuration.
|
getAccept, getAcceptCharset, getAcceptLanguage, getConf, getMaxContent, getProtocolOutput, getProxyHost, getProxyPort, getRobotRules, getTimeout, getTlsPreferredCipherSuites, getTlsPreferredProtocols, getUseHttp11, getUserAgent, logConf, main, processDeflateEncoded, processGzipEncoded, useProxypublic java.util.Collection<WebPage.Field> getFields()
public void setConf(Configuration conf)
setConf in interface ConfigurablesetConf in class HttpBaseconf - Configurationpublic static void main(java.lang.String[] args)
throws java.lang.Exception
args - Command line argumentsjava.lang.Exceptionprotected Response getResponse(java.net.URL url, WebPage page, boolean redirect) throws ProtocolException, java.io.IOException
url with a configured HTTP client and gets the
response.getResponse in class HttpBaseurl - URL to be fetchedpage - WebPage object relative to the URLredirect - Follow redirects if and only if trueProtocolExceptionjava.io.IOExceptionCopyright © 2019 The Apache Software Foundation