com.softinio.verdict4s.Verdict4sClient
See theVerdict4sClient companion object
A client for the TypeSafe evaluation API.
Takes an http4s Client[F] rather than building one. That single decision buys every backend and every platform without this library owning any of them — Ember, Fetch, Blaze, Netty, the JDK client — and it is why the test suite needs no network: Client.fromHttpApp serves routes in memory, so the same tests run on the JVM and on Node.
val client = Verdict4sClient[IO](httpClient, apiKey)
val (urgent, dept) = client.ask(
Ask(
Question.noul("Does this convey urgency?"),
Question.choice[Dept]("Which team should handle this?")
),
"Help! My payouts have been failing for 3 days."
)
Retries are on by default, matching the official SDKs; see algebra.RetryPolicy to tune or disable them.
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
In this article