Headers

open external class Headers(init: dynamic = definedExternally)(source)

Exposes the JavaScript Headers to Kotlin

Since Kotlin

1.1
open external class Headers(init: JsAny? = definedExternally) : JsAny(source)

Exposes the JavaScript Headers to Kotlin

Since Kotlin

1.8

Constructors

Link copied to clipboard
constructor(init: dynamic = definedExternally)
constructor(init: JsAny? = definedExternally)

Functions

Link copied to clipboard
fun append(name: String, value: String)
Since Kotlin 1.1
fun append(name: String, value: String)
Since Kotlin 1.8
Link copied to clipboard
fun delete(name: String)
Since Kotlin 1.1
fun delete(name: String)
Since Kotlin 1.8
Link copied to clipboard
fun get(name: String): String?
Since Kotlin 1.1
fun get(name: String): String?
Since Kotlin 1.8
Link copied to clipboard
fun has(name: String): Boolean
Since Kotlin 1.1
fun has(name: String): Boolean
Since Kotlin 1.8
Link copied to clipboard
fun set(name: String, value: String)
Since Kotlin 1.1
fun set(name: String, value: String)
Since Kotlin 1.8
Link copied to clipboard

For a Dynamic value caught in JS, returns the corresponding Throwable if it was thrown from Kotlin, or null otherwise.

Since Kotlin 1.8
Link copied to clipboard
fun <T : JsAny> JsAny.unsafeCast(): T

Cast JsAny to other Js type without runtime check

Since Kotlin 1.8