Interface JQueryXHR

Interface for the jqXHR object

Hierarchy

Index

Properties

Methods

Properties

public DONE: number

public HEADERS_RECEIVED: number

public LOADING: number

public OPENED: number

public UNSENT: number

public msCaching: string

public onabort: (ev: any) => any

public onerror: (ev: ErrorEvent) => any

public onload: (ev: Event) => any

public onloadend: (ev: ProgressEvent) => any

public onloadstart: (ev: any) => any

public onprogress: (ev: ProgressEvent) => any

public onreadystatechange: (ev: Event) => any

public ontimeout: (ev: Event) => any

public readyState: number

public response: any

public responseBody: any

optional public responseJSON?: any

Property containing the parsed response if the response Content-Type is json

public responseText: string

public responseType: string

public responseXML: Document

public status: number

public statusText: string

public timeout: number

public upload: XMLHttpRequestEventTarget

public withCredentials: boolean

Methods

public abort(statusText?: string)

Parameters

  • statusText?: string optional

public addEventListener(type: string, listener: EventListener, useCapture?: boolean)

Parameters

  • type: string
  • listener: EventListener
  • useCapture?: boolean optional

public addEventListener(type: string, listener: EventListener, useCapture?: boolean)

Parameters

  • type: string
  • listener: EventListener
  • useCapture?: boolean optional

public addEventListener(type: string, listener: EventListener, useCapture?: boolean)

Parameters

  • type: string
  • listener: EventListener
  • useCapture?: boolean optional

public addEventListener(type: string, listener: EventListener, useCapture?: boolean)

Parameters

  • type: string
  • listener: EventListener
  • useCapture?: boolean optional

public always(alwaysCallbacks1?: JQueryPromiseCallback, alwaysCallbacks2?: JQueryPromiseCallback[]): JQueryDeferred

Add handlers to be called when the Deferred object is either resolved or rejected.

Parameters

  • alwaysCallbacks1?: JQueryPromiseCallback optional

    A function, or array of functions, that is called when the Deferred is resolved or rejected.

  • alwaysCallbacks2?: JQueryPromiseCallback[] optional

    Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.

Returns

JQueryDeferred

public always(alwaysCallbacks?: Array<any>): JQueryPromise

Add handlers to be called when the Deferred object is either resolved or rejected.

Parameters

  • alwaysCallbacks?: Array<any> optional

    A function, or array of functions, that is called when the Deferred is resolved or rejected.

Returns

JQueryPromise

public create(): XMLHttpRequest

Returns

XMLHttpRequest

public dispatchEvent(evt: Event): boolean

Parameters

  • evt: Event

Returns

boolean

public dispatchEvent(evt: Event): boolean

Parameters

  • evt: Event

Returns

boolean

public dispatchEvent(evt: Event): boolean

Parameters

  • evt: Event

Returns

boolean

public dispatchEvent(evt: Event): boolean

Parameters

  • evt: Event

Returns

boolean

public done(doneCallbacks1?: JQueryPromiseCallback, doneCallbacks2?: JQueryPromiseCallback[]): JQueryDeferred

Add handlers to be called when the Deferred object is resolved.

Parameters

  • doneCallbacks1?: JQueryPromiseCallback optional

    A function, or array of functions, that are called when the Deferred is resolved.

  • doneCallbacks2?: JQueryPromiseCallback[] optional

    Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.

Returns

JQueryDeferred

public done(doneCallbacks?: Array<any>): JQueryPromise

Add handlers to be called when the Deferred object is resolved.

Parameters

  • doneCallbacks?: Array<any> optional

    A function, or array of functions, that are called when the Deferred is resolved.

Returns

JQueryPromise

public fail(failCallbacks1?: JQueryPromiseCallback, failCallbacks2?: JQueryPromiseCallback[]): JQueryDeferred

Add handlers to be called when the Deferred object is rejected.

Parameters

  • failCallbacks1?: JQueryPromiseCallback optional

    A function, or array of functions, that are called when the Deferred is rejected.

  • failCallbacks2?: JQueryPromiseCallback[] optional

    Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.

Returns

JQueryDeferred

public fail(failCallbacks?: Array<any>): JQueryPromise

Add handlers to be called when the Deferred object is rejected.

Parameters

  • failCallbacks?: Array<any> optional

    A function, or array of functions, that are called when the Deferred is rejected.

Returns

JQueryPromise

public getAllResponseHeaders(): string

Returns

string

public getResponseHeader(header: string): string

Parameters

  • header: string

Returns

string

public msCachingEnabled(): boolean

Returns

boolean

public open(method: string, url: string, async?: boolean, user?: string, password?: string)

Parameters

  • method: string
  • url: string
  • async?: boolean optional
  • user?: string optional
  • password?: string optional

public overrideMimeType(mimeType: string): any

The .overrideMimeType() method may be used in the beforeSend() callback function, for example, to modify the response content-type header. As of jQuery 1.5.1, the jqXHR object also contains the overrideMimeType() method (it was available in jQuery 1.4.x, as well, but was temporarily removed in jQuery 1.5).

Parameters

  • mimeType: string

Returns

any

public pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise

Parameters

  • doneFilter?: (x: any) => any optional
  • failFilter?: (x: any) => any optional
  • progressFilter?: (x: any) => any optional

Returns

JQueryPromise

public progress(progressCallbacks?: JQueryPromiseCallback[]): JQueryDeferred

Add handlers to be called when the Deferred object generates progress notifications.

Parameters

  • progressCallbacks?: JQueryPromiseCallback[] optional

    A function, or array of functions, to be called when the Deferred generates progress notifications.

Returns

JQueryDeferred

public progress(progressCallbacks?: Array<any>): JQueryPromise

Add handlers to be called when the Deferred object generates progress notifications.

Parameters

  • progressCallbacks?: Array<any> optional

    A function, or array of functions, to be called when the Deferred generates progress notifications.

Returns

JQueryPromise

public removeEventListener(type: string, listener: EventListener, useCapture?: boolean)

Parameters

  • type: string
  • listener: EventListener
  • useCapture?: boolean optional

public removeEventListener(type: string, listener: EventListener, useCapture?: boolean)

Parameters

  • type: string
  • listener: EventListener
  • useCapture?: boolean optional

public removeEventListener(type: string, listener: EventListener, useCapture?: boolean)

Parameters

  • type: string
  • listener: EventListener
  • useCapture?: boolean optional

public removeEventListener(type: string, listener: EventListener, useCapture?: boolean)

Parameters

  • type: string
  • listener: EventListener
  • useCapture?: boolean optional

public send(data?: any)

Parameters

  • data?: any optional

public setRequestHeader(header: string, value: string)

Parameters

  • header: string
  • value: string

public then(doneFilter: (value: T) => U, failFilter?: (...reasons: any[]) => U, progressFilter?: (...progression: any[]) => any): JQueryPromise

Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.

Parameters

  • doneFilter: (value: T) => U

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => U optional

    An optional function that is called when the Deferred is rejected.

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (value: T) => JQueryGenericPromise<U>, failFilter?: (...reasons: any[]) => U, progressFilter?: (...progression: any[]) => any): JQueryPromise

Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.

Parameters

  • doneFilter: (value: T) => JQueryGenericPromise<U>

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => U optional

    An optional function that is called when the Deferred is rejected.

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (value: T) => U, failFilter?: (...reasons: any[]) => JQueryGenericPromise<U>, progressFilter?: (...progression: any[]) => any): JQueryPromise

Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.

Parameters

  • doneFilter: (value: T) => U

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => JQueryGenericPromise<U> optional

    An optional function that is called when the Deferred is rejected.

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (value: T) => JQueryGenericPromise<U>, failFilter?: (...reasons: any[]) => JQueryGenericPromise<U>, progressFilter?: (...progression: any[]) => any): JQueryPromise

Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.

Parameters

  • doneFilter: (value: T) => JQueryGenericPromise<U>

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => JQueryGenericPromise<U> optional

    An optional function that is called when the Deferred is rejected.

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (...values: any[]) => U, failFilter?: (...reasons: any[]) => U, progressFilter?: (...progression: any[]) => any): JQueryPromise

Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.

Parameters

  • doneFilter: (...values: any[]) => U

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => U optional

    An optional function that is called when the Deferred is rejected.

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (...values: any[]) => JQueryGenericPromise<U>, failFilter?: (...reasons: any[]) => U, progressFilter?: (...progression: any[]) => any): JQueryPromise

Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.

Parameters

  • doneFilter: (...values: any[]) => JQueryGenericPromise<U>

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => U optional

    An optional function that is called when the Deferred is rejected.

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (...values: any[]) => U, failFilter?: (...reasons: any[]) => JQueryGenericPromise<U>, progressFilter?: (...progression: any[]) => any): JQueryPromise

Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.

Parameters

  • doneFilter: (...values: any[]) => U

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => JQueryGenericPromise<U> optional

    An optional function that is called when the Deferred is rejected.

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise

public then(doneFilter: (...values: any[]) => JQueryGenericPromise<U>, failFilter?: (...reasons: any[]) => JQueryGenericPromise<U>, progressFilter?: (...progression: any[]) => any): JQueryPromise

Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.

Parameters

  • doneFilter: (...values: any[]) => JQueryGenericPromise<U>

    A function that is called when the Deferred is resolved.

  • failFilter?: (...reasons: any[]) => JQueryGenericPromise<U> optional

    An optional function that is called when the Deferred is rejected.

  • progressFilter?: (...progression: any[]) => any optional

    An optional function that is called when progress notifications are sent to the Deferred.

Returns

JQueryPromise