Factory

Fetch: Headers factory.

Specifies constructors which are expected to be made available for a given FetchHeaders implementation. These constructors include JavaScript-spec constructors as well as regular host-side wrap or create constructors. In all cases, these constructors are expected to return a copy of the provided data, as applicable.

Inheritors

Functions

Link copied to clipboard
abstract fun empty(): Impl

Create an empty set of immutable fetch headers.

Link copied to clipboard
abstract fun from(previous: FetchHeaders): Impl

Create an immutable copy of the provided previous fetch headers.

abstract fun from(vararg pairs: Pair<String, String>): Impl

Create a set of immutable fetch headers from the provided set of pairs.

Link copied to clipboard
abstract fun fromMap(map: Map<String, String>): Impl

Create a set of immutable fetch headers from the provided map data.

Link copied to clipboard
abstract fun fromMultiMap(map: Map<String, List<String>>): Impl

Create a set of immutable fetch headers from the provided map data.

Link copied to clipboard
abstract fun fromPairs(pairs: Collection<Pair<String, String>>): Impl

Create a set of immutable fetch headers from the provided set of pairs.