FetchOptions

class FetchOptions[In]
class Object
trait Matchable
class Any

Value members

Concrete methods

def abortOnStop(): Unit

Abort the fetch request if FetchStream is stopped.

Abort the fetch request if FetchStream is stopped.

By default, stopping the stream does not affect the underlying Fetch request, and toggling this setting does not really affect visible execution of the stream.

Aborting on stop might yield a marginal efficiency gain in certain scenarios.

def abortStream(source: EventStream[Any]): Unit

Abort the Fetch request when abortStream emits. This is a wrapper for https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal Errors emitted by abortStream will be re-emitted by FetchStream.

Abort the Fetch request when abortStream emits. This is a wrapper for https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal Errors emitted by abortStream will be re-emitted by FetchStream.

def body(content: In): Unit
def cache(get: RequestCache.type => RequestCache): Unit
def credentials(get: RequestCredentials.type => RequestCredentials): Unit
def empty(): Unit
def headers(kvs: (String, String)*): Unit

Set headers, overriding previous values for the corresponding keys.

Set headers, overriding previous values for the corresponding keys.

Value parameters:
kvs

(key1 -> value1, key2 -> value2)

def headersAppend(kvs: (String, String)*): Unit

Append headers – this is like setting headers, but for those keys that accept multiple values, the provided value(s) will be added to the key without removing the previously set value.

Append headers – this is like setting headers, but for those keys that accept multiple values, the provided value(s) will be added to the key without removing the previously set value.

Value parameters:
kvs

(key1 -> value1, key2 -> value2)

def integrity(hash: String): Unit
def keepAlive(value: Boolean): Unit
def mode(get: RequestMode.type => RequestMode): Unit
def redirect(get: RequestRedirect.type => RequestRedirect): Unit
def referrer(url: String): Unit
def referrerClear(): Unit
def referrerPolicy(get: ReferrerPolicy.type => ReferrerPolicy): Unit