EitherBackend

sttp.client3.EitherBackend
class EitherBackend[P](delegate: SttpBackend[Identity, P]) extends SttpBackend[[_] =>> Either[Throwable, _$1], P]

A synchronous backend that safely wraps SttpBackend exceptions in Either[Throwable, *]'s

Type parameters

P

TODO

Value parameters

delegate

A synchronous SttpBackend which to which this backend forwards all requests

Attributes

Graph
Supertypes
trait SttpBackend[[_] =>> Either[Throwable, _$1], P]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def close(): Either[Throwable, Unit]

Attributes

Definition Classes
override def responseMonad: MonadError[[_] =>> Either[Throwable, _$5]]

A monad instance for the effect type used when returning responses. Allows writing wrapper backends, which map/flatMap over the return value of send.

A monad instance for the effect type used when returning responses. Allows writing wrapper backends, which map/flatMap over the return value of send.

Attributes

Definition Classes
override def send[T, R >: P & Effect[[_] =>> Either[Throwable, _$2]]](request: Request[T, R]): Either[Throwable, Response[T]]

Type parameters

R

The capabilities required by the request. This must be a subset of the the capabilities supported by the backend (which always includes Effect[F]).

Attributes

Definition Classes