XMLHttpRequest

open external class XMLHttpRequest : 
    XMLHttpRequestEventTarget
(source)

Platform and version requirements: JS

Exposes the JavaScript XMLHttpRequest to Kotlin

Constructors

<init>

XMLHttpRequest()

Exposes the JavaScript XMLHttpRequest to Kotlin

Properties

onreadystatechange

var onreadystatechange: (Event) -> dynamic

readyState

open val readyState: Short

response

open val response: Any?

responseText

open val responseText: String

responseType

var responseType: XMLHttpRequestResponseType

responseURL

open val responseURL: String

responseXML

open val responseXML: Document?

status

open val status: Short

statusText

open val statusText: String

timeout

var timeout: Int

upload

open val upload: XMLHttpRequestUpload

withCredentials

var withCredentials: Boolean

Inherited Properties

onabort

open var onabort: (Event) -> dynamic

onerror

open var onerror: (Event) -> dynamic

onload

open var onload: (Event) -> dynamic

onloadend

open var onloadend: (Event) -> dynamic

onloadstart

open var onloadstart: (Event) -> dynamic

onprogress

open var onprogress: (Event) -> dynamic

ontimeout

open var ontimeout: (Event) -> dynamic

Functions

abort

fun abort()

getAllResponseHeaders

fun getAllResponseHeaders(): String

getResponseHeader

fun getResponseHeader(name: String): String?

open

fun open(method: String, url: String)
fun open(
    method: String,
    url: String,
    async: Boolean,
    username: String? = definedExternally,
    password: String? = definedExternally)

overrideMimeType

fun overrideMimeType(mime: String)

send

fun send(body: dynamic = definedExternally)

setRequestHeader

fun setRequestHeader(name: String, value: String)

Companion Object Properties

DONE

val DONE: Short

HEADERS_RECEIVED

val HEADERS_RECEIVED: Short

LOADING

val LOADING: Short

OPENED

val OPENED: Short

UNSENT

val UNSENT: Short