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 Stringurlprivate final Function2<String, RequestData<T>, String>urlProviderprivate final Integerconcurrencyprivate final RateLimitOptionsrateOptionsprivate final Map<String, List<HeaderValue>>headersprivate final HttpMethodtypeprivate final RequestDataSupplier<T>dataSupplierprivate final HttpBody<T>bodyprivate final OnErroronErrorprivate final List<BeforeHook>beforeHooksprivate final List<AfterHook>afterHooksprivate final LifecycleControllerlifecycleController
-
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 StringgetUrl()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 IntegergetConcurrency()final RateLimitOptionsgetRateOptions()final Map<String, List<HeaderValue>>getHeaders()final HttpMethodgetType()final RequestDataSupplier<T>getDataSupplier()final HttpBody<T>getBody()final OnErrorgetOnError()final List<BeforeHook>getBeforeHooks()final List<AfterHook>getAfterHooks()final LifecycleControllergetLifecycleController()-
-
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()
-
-
-
-