public class HttpFetcherRequest extends Object implements Request, Unwrappable
Request.Method
Constructor and Description |
---|
HttpFetcherRequest(Request innerRequest)
Constructs an instance of http fetcher 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.
|
HttpFetcherRequest |
prependHeaders(Map<String,String> preHeaders)
Prepend headers to the current headers.
|
HttpFetcherRequest |
setProxy(org.apache.http.HttpHost proxy)
Sets proxy to be used for this request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
unwrapRequest
public HttpFetcherRequest(Request innerRequest)
innerRequest
- An instance of underlying requestpublic final HttpFetcherRequest prependHeaders(Map<String,String> preHeaders)
preHeaders
- Headers to be prependedpublic 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 HttpFetcherRequest setProxy(org.apache.http.HttpHost proxy)
proxy
- Proxy to be used for this requestpublic final SleepScheduler getSleepScheduler()
Request
getSleepScheduler
in interface Request
public final Request getInner()
Unwrappable
getInner
in interface Unwrappable
Copyright © 2018. All rights reserved.