Response

open external class Response(body: dynamic = definedExternally, init: ResponseInit = definedExternally) : Body(source)

Exposes the JavaScript Response to Kotlin

Since Kotlin

1.1
open external class Response(body: JsAny? = definedExternally, init: ResponseInit = definedExternally) : Body, JsAny(source)

Exposes the JavaScript Response to Kotlin

Since Kotlin

1.8

Constructors

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

Types

Link copied to clipboard
object Companion
Since Kotlin 1.1
object Companion
Since Kotlin 1.8

Properties

Link copied to clipboard
open val body: dynamic
Since Kotlin 1.1
open val body: JsAny?
Since Kotlin 1.8
Link copied to clipboard
open override val bodyUsed: Boolean
Since Kotlin 1.1
open override val bodyUsed: Boolean
Since Kotlin 1.8
Link copied to clipboard
open val headers: Headers
Since Kotlin 1.1
open val headers: Headers
Since Kotlin 1.8
Link copied to clipboard
open val ok: Boolean
Since Kotlin 1.1
open val ok: Boolean
Since Kotlin 1.8
Link copied to clipboard
Since Kotlin 1.1
Since Kotlin 1.8
Link copied to clipboard
open val status: Short
Since Kotlin 1.1
open val status: Short
Since Kotlin 1.8
Link copied to clipboard
open val statusText: String
Since Kotlin 1.1
open val statusText: String
Since Kotlin 1.8
Link copied to clipboard
Since Kotlin 1.1
Since Kotlin 1.8
Link copied to clipboard
open val type: ResponseType
Since Kotlin 1.1
open val type: ResponseType
Since Kotlin 1.8
Link copied to clipboard
open val url: String
Since Kotlin 1.1
open val url: String
Since Kotlin 1.8

Functions

Link copied to clipboard
open override fun arrayBuffer(): Promise<ArrayBuffer>
Since Kotlin 1.1
open override fun arrayBuffer(): Promise<ArrayBuffer>
Since Kotlin 1.8
Link copied to clipboard
open override fun blob(): Promise<Blob>
Since Kotlin 1.1
open override fun blob(): Promise<Blob>
Since Kotlin 1.8
Link copied to clipboard
Since Kotlin 1.1
Since Kotlin 1.8
Link copied to clipboard
open override fun formData(): Promise<FormData>
Since Kotlin 1.1
open override fun formData(): Promise<FormData>
Since Kotlin 1.8
Link copied to clipboard
open override fun json(): Promise<Any?>
Since Kotlin 1.1
open override fun json(): Promise<JsAny?>
Since Kotlin 1.8
Link copied to clipboard
open override fun text(): Promise<String>
Since Kotlin 1.1
open override fun text(): Promise<JsString>
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