FetchClientBuilder

sealed abstract
class FetchClientBuilder[F[_]] extends BackendBuilder[F, Client[F]]

Configure and obtain a FetchClient

Value Params
cache

how the request will interact with the browser’s HTTP cache

credentials

what browsers do with credentials (cookies, HTTP authentication entries, and TLS client certificates)

mode

mode you want to use for the request, e.g., cors, no-cors, or same-origin

redirect

how to handle a redirect response

referrer

referrer of the request

referrerPolicy

referrer policy to use for the request

requestTimeout

maximum duration from the submission of a request through reading the body before a timeout.

Companion
object
trait BackendBuilder[F, Client[F]]
class Object
trait Matchable
class Any

Value members

Concrete methods

def create: Client[F]

Creates a Client.

Creates a Client.

override
def resource: Resource[F, Client[F]]
Definition Classes
BackendBuilder
def withCache(cache: RequestCache): FetchClientBuilder[F]
def withCacheOption(cache: Option[RequestCache]): FetchClientBuilder[F]
def withCredentials(credentials: RequestCredentials): FetchClientBuilder[F]
def withCredentialsOption(credentials: Option[RequestCredentials]): FetchClientBuilder[F]
def withMode(mode: RequestMode): FetchClientBuilder[F]
def withModeOption(mode: Option[RequestMode]): FetchClientBuilder[F]
def withRedirect(redirect: RequestRedirect): FetchClientBuilder[F]
def withRedirectOption(redirect: Option[RequestRedirect]): FetchClientBuilder[F]
def withReferrerPolicy(referrerPolicy: ReferrerPolicy): FetchClientBuilder[F]
def withReferrerPolicyOption(referrerPolicy: Option[ReferrerPolicy]): FetchClientBuilder[F]
def withRequestTimeout(requestTimeout: Duration): FetchClientBuilder[F]

Inherited methods

def allocated: F[(Client[F], F[Unit])]

Returns an effect that allocates a backend and an F[Unit] to release it. The returned F waits until the backend is ready to process requests. The second element of the tuple shuts down the backend when run.

Returns an effect that allocates a backend and an F[Unit] to release it. The returned F waits until the backend is ready to process requests. The second element of the tuple shuts down the backend when run.

Unlike resource and stream, there is no automatic release of the backend. This function is intended for REPL sessions, tests, and other situations where composing a cats.effect.Resource or fs2.Stream is not tenable. resource or stream is recommended wherever possible.

Inherited from
BackendBuilder
def stream: Stream[F, Client[F]]

Returns the backend as a single-element stream. The stream does not emit until the backend is ready to process requests. The backend is shut down when the stream is finalized.

Returns the backend as a single-element stream. The stream does not emit until the backend is ready to process requests. The backend is shut down when the stream is finalized.

Inherited from
BackendBuilder

Concrete fields

val cache: Option[RequestCache]
val credentials: Option[RequestCredentials]
val mode: Option[RequestMode]
val redirect: Option[RequestRedirect]
val referrer: Option[FetchReferrer]
val referrerPolicy: Option[ReferrerPolicy]
val requestTimeout: Duration