Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/xhr/mod.ts>XMLHttpRequest

An XMLHttpRequest polyfill for Deno CLI and Deploy 🦕
Very Popular
Go to Latest
class XMLHttpRequest
import { XMLHttpRequest } from "https://deno.land/x/xhr@0.3.0/mod.ts";

Properties

readonly
DONE
readonly
HEADERS_RECEIVED
readonly
LOADING
onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null
readonly
OPENED
readonly
readyState: number
readonly
response: any
readonly
responseText: string
responseType: XMLHttpRequestResponseType
readonly
responseURL: string
readonly
responseXML: null
readonly
status: number
readonly
statusText: string
timeout: number
readonly
UNSENT
readonly
upload: XMLHttpRequestUpload
withCredentials: boolean

Methods

abort(): void
getAllResponseHeaders(): string | null
getResponseHeader(name: string): string | null
open(
method: string,
url: string,
async?,
username?: string | null,
password?: string | null,
): void
overrideMimeType(mime: string): void
send(body?: BodyInit | null): void
setRequestHeader(name: string, value: string): void

Static Properties

readonly
DONE
readonly
HEADERS_RECEIVED
readonly
LOADING
readonly
OPENED
readonly
UNSENT