JevCallOptions

Settings for single calls that override the client's own, as both official SDKs allow:

val urgent = JevCallOptions {
timeout = 2.seconds
retry = RetryPolicy.NONE
headers["X-Trace-Id"] = traceId
}
val result = jev.withOptions(urgent).ask(Triage, state = ticket)

A setting left unset keeps the client's value. Pass options to JevApi.evaluate or JevApi.models directly, or wrap an API with withOptions so that query, ask and the blocking calls use them too. Options are checked when they're built and can't change afterwards, so one instance can be shared.

Constructors

Link copied to clipboard
constructor(block: JevCallOptionsBuilder.() -> Unit)

Builds options inline. From Java: new JevCallOptions(options -> { ...; return Unit.INSTANCE; }).

Properties

Link copied to clipboard

Top-level fields added to the evaluate request body, for API parameters jev4k doesn't model. models() sends no body, so it ignores them.

Link copied to clipboard

Headers to send. One with the name of a client header, or of a built-in one such as Authorization, replaces it.

Link copied to clipboard

The retry policy, replacing the client's policy as a whole.

Link copied to clipboard

The timeout for each HTTP attempt, instead of the client's.

Functions

Link copied to clipboard
open override fun toString(): String