Response

open class Response(response: Response, val request: Request, val propagate: Boolean = true)

Represents the common fields and attributes of an HTTP response. It contains also the original Request which was made to get this Response.

Constructors

Link copied to clipboard
fun Response(response: Response, request: Request, propagate: Boolean = true)

Functions

Link copied to clipboard
suspend fun arrayBuffer(): ArrayBuffer

extracts the body as arrayBuffer from the given Response

Link copied to clipboard
suspend fun blob(): Blob

extracts the body as blob from the given Response

Link copied to clipboard
suspend fun body(): String

extracts the body as string from the given Response

Link copied to clipboard
fun copy(response: Response = this.response, request: Request = this.request, propagate: Boolean = this.propagate): Response
Link copied to clipboard
suspend fun formData(): FormData

extracts the body as formData from the given Response

Link copied to clipboard
suspend fun json(): Any?

extracts the body as json from the given Response

Properties

Link copied to clipboard

returns the Headers from the given Response

Link copied to clipboard
val ok: Boolean
Link copied to clipboard
val propagate: Boolean = true
Link copied to clipboard
Link copied to clipboard
val status: Int
Link copied to clipboard
Link copied to clipboard
val url: String