Package ai.preferred.venom.request
Interface Request
-
- All Known Subinterfaces:
Unwrappable
- All Known Implementing Classes:
CrawlerRequest
,HttpFetcherRequest
,StorageFetcherRequest
,VRequest
public interface Request
- Author:
- Maksim Tkachenko, Truong Quoc Tuan, Ween Jiann Lee
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Request.Method
The method of the request to be made.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getBody()
Returns the request body of the request or null if none specified.@NotNull Map<String,String>
getHeaders()
Returns the headers set for the request.@NotNull 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.@NotNull String
getUrl()
Returns the url of the request.
-
-
-
Method Detail
-
getMethod
@NotNull @NotNull Request.Method getMethod()
Returns the method type of the request.- Returns:
- method type
-
getBody
@Nullable String getBody()
Returns the request body of the request or null if none specified.- Returns:
- request body
-
getUrl
@NotNull @NotNull String getUrl()
Returns the url of the request.- Returns:
- url
-
getHeaders
@NotNull @NotNull Map<String,String> getHeaders()
Returns the headers set for the request.- Returns:
- a map of the headers set
-
getProxy
@Nullable org.apache.http.HttpHost getProxy()
Returns the proxy set to be used for the request or default to fetcher if none specified.- Returns:
- proxy
-
getSleepScheduler
@Nullable SleepScheduler getSleepScheduler()
Returns information about the amount of sleep before this request is made.- Returns:
- an instance of SleepScheduler
-
-