open

fun open(method: RequestMethod, url: String)(source)

Sets the request method, request URL, and synchronous flag.

Throws a "SyntaxError" DOMException if either method is not a valid method or url cannot be parsed.

Throws a "SecurityError" DOMException if method is a case-insensitive match for CONNECT, TRACE, or TRACK.

Throws an "InvalidAccessError" DOMException if async is false, current global object is a Window object, and the timeout attribute is not zero or the responseType attribute is not the empty string.

MDN Reference


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