TryBackend

sttp.client3.TryBackend
class TryBackend[P](delegate: SttpBackend[Identity, P]) extends SttpBackend[Try, P]

A synchronous backend that safely wraps SttpBackend exceptions in Try's

Type parameters

P

TODO

Value parameters

delegate

A synchronous SttpBackend which to which this backend forwards all requests

Attributes

Graph
Supertypes
trait SttpBackend[Try, P]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def close(): Try[Unit]

Attributes

Definition Classes
override def responseMonad: MonadError[Try]

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[Try]](request: Request[T, R]): Try[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