Package net.devslash
Class Call
-
- All Implemented Interfaces:
public final class Call<T extends Object>
A build call, generally should not be built directly and should be built by using CallBuilder. This often happens automatically by using the runHttp block
-
-
Field Summary
Fields Modifier and Type Field Description private final String
url
private final Function2<String, RequestData<T>, String>
urlProvider
private final Integer
concurrency
private final RateLimitOptions
rateOptions
private final Map<String, List<HeaderValue>>
headers
private final HttpMethod
type
private final RequestDataSupplier<T>
dataSupplier
private final HttpBody<T>
body
private final OnError
onError
private final List<BeforeHook>
beforeHooks
private final List<AfterHook>
afterHooks
private final LifecycleController
lifecycleController
-
Constructor Summary
Constructors Constructor Description Call(String url, Function2<String, RequestData<T>, String> urlProvider, Integer concurrency, RateLimitOptions rateOptions, Map<String, List<HeaderValue>> headers, HttpMethod type, RequestDataSupplier<T> dataSupplier, HttpBody<T> body, OnError onError, List<BeforeHook> beforeHooks, List<AfterHook> afterHooks, LifecycleController lifecycleController)
-
Method Summary
Modifier and Type Method Description final String
getUrl()
final Function2<String, RequestData<T>, String>
getUrlProvider()
If provided, the @property url will be passed in as the first argument to the URL provider alongside the Request data. final Integer
getConcurrency()
final RateLimitOptions
getRateOptions()
final Map<String, List<HeaderValue>>
getHeaders()
final HttpMethod
getType()
final RequestDataSupplier<T>
getDataSupplier()
final HttpBody<T>
getBody()
final OnError
getOnError()
final List<BeforeHook>
getBeforeHooks()
final List<AfterHook>
getAfterHooks()
final LifecycleController
getLifecycleController()
-
-
Constructor Detail
-
Call
Call(String url, Function2<String, RequestData<T>, String> urlProvider, Integer concurrency, RateLimitOptions rateOptions, Map<String, List<HeaderValue>> headers, HttpMethod type, RequestDataSupplier<T> dataSupplier, HttpBody<T> body, OnError onError, List<BeforeHook> beforeHooks, List<AfterHook> afterHooks, LifecycleController lifecycleController)
-
-
Method Detail
-
getUrlProvider
final Function2<String, RequestData<T>, String> getUrlProvider()
If provided, the @property url will be passed in as the first argument to the URL provider alongside the Request data. This will allow a client to modify the URL based on requestData without using the
![0-9]+!
syntax.If not provided, the URL will use the built-in replacement provide that looks for !1! like patterns to replace with data.
-
getConcurrency
final Integer getConcurrency()
-
getRateOptions
final RateLimitOptions getRateOptions()
-
getHeaders
final Map<String, List<HeaderValue>> getHeaders()
-
getType
final HttpMethod getType()
-
getDataSupplier
final RequestDataSupplier<T> getDataSupplier()
-
getOnError
final OnError getOnError()
-
getBeforeHooks
final List<BeforeHook> getBeforeHooks()
-
getAfterHooks
final List<AfterHook> getAfterHooks()
-
getLifecycleController
final LifecycleController getLifecycleController()
-
-
-
-