works.iterative.tapir.ApiClientFactory
See theApiClientFactory companion object
trait ApiClientFactory
Create effectful methods to perform the endpoint operation.
The factory takes an endpoint with correct type signature, and returns a function that can call the endpoint.
The resulting error channel is whatever the endpoint declares as the client error channel, eg. the type E of ApiError[E], which is what is reported in RequestFailure[E].
The other options - AuthenticationFailure, ServerFailure - are converted to defects to be handled at another level.
This way the client can deal only with what it can actually do something about.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Members list
In this article