SttpBackendStub

sttp.client3.testing.SttpBackendStub
See theSttpBackendStub companion class

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class RawStream[T](s: T)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def apply[F[_], P](responseMonad: MonadError[F]): SttpBackendStub[F, P]

Create a stub backend using the given response monad (which determines the effect type for responses), and any capabilities (such as streaming or web socket support).

Create a stub backend using the given response monad (which determines the effect type for responses), and any capabilities (such as streaming or web socket support).

Attributes

def asynchronousFuture: SttpBackendStub[Future, WebSockets]

Create a stub of an asynchronous backend (which uses the Scala's built-in Future as the effect type), without streaming.

Create a stub of an asynchronous backend (which uses the Scala's built-in Future as the effect type), without streaming.

Attributes

Create a stub of a synchronous backend (which doesn't use an effect type), without streaming.

Create a stub of a synchronous backend (which doesn't use an effect type), without streaming.

Attributes

def withFallback[F[_], P0, P1 >: P0](fallback: SttpBackend[F, P0]): SttpBackendStub[F, P1]

Create a stub backend which delegates send requests to the given fallback backend, if the request doesn't match any of the specified predicates.

Create a stub backend which delegates send requests to the given fallback backend, if the request doesn't match any of the specified predicates.

Attributes