Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface JQueryXHR

Interface for the jqXHR object

Hierarchy

Index

Properties

DONE

DONE: number

HEADERS_RECEIVED

HEADERS_RECEIVED: number

LOADING

LOADING: number

OPENED

OPENED: number

UNSENT

UNSENT: number

XMLHttpRequest

XMLHttpRequest: object

Type declaration

  • constructor: function
    • Returns __type

  • DONE: number
  • HEADERS_RECEIVED: number
  • LOADING: number
  • OPENED: number
  • UNSENT: number
  • prototype: XMLHttpRequest
  • create: function
    • create(): XMLHttpRequest
    • Returns XMLHttpRequest

Optional msCaching

msCaching: string

onabort

onabort: function

Type declaration

    • (this: , ev: Event): any
    • Parameters

      • this:
      • ev: Event

      Returns any

onerror

onerror: function

Type declaration

    • (this: , ev: ErrorEvent): any
    • Parameters

      • this:
      • ev: ErrorEvent

      Returns any

onload

onload: function

Type declaration

    • (this: , ev: Event): any
    • Parameters

      • this:
      • ev: Event

      Returns any

onloadend

onloadend: function

Type declaration

    • (this: , ev: ProgressEvent): any
    • Parameters

      • this:
      • ev: ProgressEvent

      Returns any

onloadstart

onloadstart: function

Type declaration

    • (this: , ev: Event): any
    • Parameters

      • this:
      • ev: Event

      Returns any

onprogress

onprogress: function

Type declaration

    • (this: , ev: ProgressEvent): any
    • Parameters

      • this:
      • ev: ProgressEvent

      Returns any

onreadystatechange

onreadystatechange: function

Type declaration

    • (this: , ev: ProgressEvent): any
    • Parameters

      • this:
      • ev: ProgressEvent

      Returns any

ontimeout

ontimeout: function

Type declaration

    • (this: , ev: ProgressEvent): any
    • Parameters

      • this:
      • ev: ProgressEvent

      Returns any

readyState

readyState: number

response

response: any

Optional responseJSON

responseJSON: any

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

responseText

responseText: string

responseType

responseType: string

responseXML

responseXML: any

status

status: number

statusText

statusText: string

timeout

timeout: number

upload

upload: XMLHttpRequestUpload

withCredentials

withCredentials: boolean

Methods

abort

  • abort(statusText?: string): void
  • Cancel the request.

    Parameters

    • Optional statusText: string

      A string passed as the textStatus parameter for the done callback. Default value: "canceled"

    Returns void

addEventListener

  • addEventListener(type: "abort", listener: function, useCapture?: boolean): void
  • addEventListener(type: "error", listener: function, useCapture?: boolean): void
  • addEventListener(type: "load", listener: function, useCapture?: boolean): void
  • addEventListener(type: "loadend", listener: function, useCapture?: boolean): void
  • addEventListener(type: "loadstart", listener: function, useCapture?: boolean): void
  • addEventListener(type: "progress", listener: function, useCapture?: boolean): void
  • addEventListener(type: "readystatechange", listener: function, useCapture?: boolean): void
  • addEventListener(type: "timeout", listener: function, useCapture?: boolean): void
  • addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void
  • Parameters

    • type: "abort"
    • listener: function
        • (this: , ev: Event): any
        • Parameters

          • this:
          • ev: Event

          Returns any

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: "error"
    • listener: function
        • (this: , ev: ErrorEvent): any
        • Parameters

          • this:
          • ev: ErrorEvent

          Returns any

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: "load"
    • listener: function
        • (this: , ev: Event): any
        • Parameters

          • this:
          • ev: Event

          Returns any

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: "loadend"
    • listener: function
        • (this: , ev: ProgressEvent): any
        • Parameters

          • this:
          • ev: ProgressEvent

          Returns any

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: "loadstart"
    • listener: function
        • (this: , ev: Event): any
        • Parameters

          • this:
          • ev: Event

          Returns any

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: "progress"
    • listener: function
        • (this: , ev: ProgressEvent): any
        • Parameters

          • this:
          • ev: ProgressEvent

          Returns any

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: "readystatechange"
    • listener: function
        • (this: , ev: ProgressEvent): any
        • Parameters

          • this:
          • ev: ProgressEvent

          Returns any

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: "timeout"
    • listener: function
        • (this: , ev: ProgressEvent): any
        • Parameters

          • this:
          • ev: ProgressEvent

          Returns any

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional useCapture: boolean

    Returns void

always

dispatchEvent

  • dispatchEvent(evt: Event): boolean
  • Parameters

    • evt: Event

    Returns boolean

done

error

  • error(xhr: JQueryXHR, textStatus: string, errorThrown: string): void
  • A function to be called if the request fails.

    Parameters

    • xhr: JQueryXHR
    • textStatus: string
    • errorThrown: string

    Returns void

fail

getAllResponseHeaders

  • getAllResponseHeaders(): string
  • Returns string

getResponseHeader

  • getResponseHeader(header: string): string | null
  • Parameters

    • header: string

    Returns string | null

msCachingEnabled

  • msCachingEnabled(): boolean
  • Returns boolean

open

  • open(method: string, url: string, async?: boolean, user?: string, password?: string): void
  • Parameters

    • method: string
    • url: string
    • Optional async: boolean
    • Optional user: string
    • Optional password: string

    Returns void

overrideMimeType

  • 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

pipe

  • pipe(doneFilter?: function, failFilter?: function, progressFilter?: function): JQueryPromise<any>
  • Parameters

    • Optional doneFilter: function
        • (x: any): any
        • Parameters

          • x: any

          Returns any

    • Optional failFilter: function
        • (x: any): any
        • Parameters

          • x: any

          Returns any

    • Optional progressFilter: function
        • (x: any): any
        • Parameters

          • x: any

          Returns any

    Returns JQueryPromise<any>

progress

removeEventListener

  • removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void
  • Parameters

    • type: string
    • Optional listener: EventListenerOrEventListenerObject
    • Optional useCapture: boolean

    Returns void

send

  • send(data?: Document): void
  • send(data?: string): void
  • send(data?: any): void
  • Parameters

    • Optional data: Document

    Returns void

  • Parameters

    • Optional data: string

    Returns void

  • Parameters

    • Optional data: any

    Returns void

setRequestHeader

  • setRequestHeader(header: string, value: string): void
  • Parameters

    • header: string
    • value: string

    Returns void

state

  • state(): string
  • Determine the current state of a Deferred object.

    Returns string

then

  • then<R>(doneCallback: function, failCallback?: function): JQueryPromise<R>
  • Incorporates the functionality of the .done() and .fail() methods, allowing (as of jQuery 1.8) the underlying Promise to be manipulated. Refer to deferred.then() for implementation details.

    Type parameters

    • R

    Parameters

    • doneCallback: function
        • (data: any, textStatus: string, jqXHR: JQueryXHR): R
        • Parameters

          • data: any
          • textStatus: string
          • jqXHR: JQueryXHR

          Returns R

    • Optional failCallback: function
        • (jqXHR: JQueryXHR, textStatus: string, errorThrown: any): void
        • Parameters

          • jqXHR: JQueryXHR
          • textStatus: string
          • errorThrown: any

          Returns void

    Returns JQueryPromise<R>

Generated using TypeDoc