AbstractFetchBackend

sttp.client4.fetch.AbstractFetchBackend
abstract class AbstractFetchBackend[F[_], S <: Streams[S]](options: FetchOptions, customizeRequest: Request => Request, _monad: MonadError[F]) extends GenericBackend[F, S & WebSockets], WebSocketBackend[F]

A backend that uses the fetch JavaScript api.

Attributes

See also
Graph
Supertypes
trait WebSocketBackend[F]
trait Backend[F]
trait GenericBackend[F, S & WebSockets]
class Object
trait Matchable
class Any
Show all
Known subtypes
class FetchBackend

Members list

Type members

Types

type R = S & WebSockets & Effect[F]

Value members

Abstract methods

protected def addCancelTimeoutHook[T](result: F[T], cancel: () => Unit, cleanup: () => Unit): F[T]
protected def compileWebSocketPipe(ws: WebSocket[F], pipe: streams.Pipe[Data[_], WebSocketFrame]): F[Unit]
protected def handleResponseAsStream(response: Response): F[(streams.BinaryStream, () => F[Unit])]
protected def handleStreamBody(s: streams.BinaryStream): F[UndefOr[BodyInit]]

Concrete methods

override def close(): F[Unit]

Close the backend, releasing any resources (such as thread or connection pools) that have been allocated when opening or using the backend.

Close the backend, releasing any resources (such as thread or connection pools) that have been allocated when opening or using the backend.

Attributes

Definition Classes
override def send[T](request: GenericRequest[T, R]): F[Response[T]]

Send the given request. Should only be used when implementing new backends, or backend wrappers. Client code should instead use the send methods on the request type, e.g. Request.send.

Send the given request. Should only be used when implementing new backends, or backend wrappers. Client code should instead use the send methods on the request type, e.g. Request.send.

Attributes

Definition Classes

Abstract fields

val streams: Streams[S]

Implicits

Implicits

implicit override def monad: MonadError[F]

A monad instance for the F effect type. Allows writing wrapper backends, which map/`flatMap`` over the return value of send.

A monad instance for the F effect type. Allows writing wrapper backends, which map/`flatMap`` over the return value of send.

Attributes

Definition Classes