public class CrawlerRequest extends Object implements Request, Unwrappable
Request.Method
Constructor and Description |
---|
CrawlerRequest(Request request)
Constructs an instance of crawler request with an underlying
request.
|
Modifier and Type | Method and Description |
---|---|
String |
getBody()
Returns the request body of the request or null if none specified.
|
Map<String,String> |
getHeaders()
Returns the headers set for the request.
|
Request |
getInner()
Returns the unwrapped version of this request.
|
Request.Method |
getMethod()
Returns the method type of the request.
|
org.apache.http.HttpHost |
getProxy()
Returns the proxy set to be used for the request or default to
fetcher if none specified.
|
SleepScheduler |
getSleepScheduler()
Returns information about the amount of sleep before this request
is made.
|
String |
getUrl()
Returns the url of the request.
|
void |
removeProxy()
Remove the proxy from this request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
unwrapRequest
public CrawlerRequest(Request request)
request
- An instance of the underlying requestpublic final Request.Method getMethod()
Request
public final String getBody()
Request
public final String getUrl()
Request
public final Map<String,String> getHeaders()
Request
getHeaders
in interface Request
public final org.apache.http.HttpHost getProxy()
Request
public final void removeProxy()
public final SleepScheduler getSleepScheduler()
Request
getSleepScheduler
in interface Request
public final Request getInner()
Unwrappable
getInner
in interface Unwrappable
Copyright © 2018. All rights reserved.