Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Ajax

Hierarchy

  • Ajax

Index

Constructors

constructor

  • Returns Ajax

  • Returns Ajax

  • Returns Ajax

Properties

Private ajaxError

  • ajaxError(xhr: XMLHttpRequest, deferred: Deferred<any>): void
  • Parameters

    • xhr: XMLHttpRequest
    • deferred: Deferred<any>

    Returns void

Private ajaxJSONP

  • Parameters

    • options: RequestOptions
    • deferred: Deferred<any>

    Returns Thenable<any>

Private ajaxSuccess

  • ajaxSuccess(data: any, deferred: Deferred<any>): void
  • Parameters

    Returns void

Private appendQuery

  • appendQuery(url: string, query: string): string
  • Parameters

    • url: string
    • query: string

    Returns string

Private blankRE

blankRE: any = /^\s*$/

Private document

document: any = window.document

Private empty

  • empty(): void
  • Returns void

Private htmlType

htmlType: any = "text/html"

Private jsonType

jsonType: any = "application/json"

Private mimeToDataType

  • mimeToDataType(mime: string): string
  • Parameters

    • mime: string

    Returns string

Private originAnchor

originAnchor: any = document.createElement("a")

Private rscript

rscript: any = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi

Private scriptTypeRE

scriptTypeRE: any = /^(?:text|application)\/javascript/i

Private serializeData

  • serializeData(options: RequestOptions): void
  • Parameters

    • options: RequestOptions

    Returns void

Private xmlTypeRE

xmlTypeRE: any = /^(?:text|application)\/xml/i

Static Private _jsonpId

_jsonpId: any = 0

Methods

ajax

  • Parameters

    Returns Thenable<any>

  • Parameters

    • options: RequestOptions

    Returns Thenable<any>

  • Parameters

    • options: RequestOptions

    Returns Thenable<any>

param

  • param(obj: any, traditional: boolean): any
  • param(obj: any, traditional: boolean): any
  • param(obj: any, traditional: boolean): any
  • Parameters

    • obj: any
    • traditional: boolean

    Returns any

  • Parameters

    • obj: any
    • traditional: boolean

    Returns any

  • Parameters

    • obj: any
    • traditional: boolean

    Returns any

serialize

  • serialize(params: any, obj: any, traditional: boolean, scope?: any): void
  • serialize(params: any, obj: any, traditional: boolean, scope?: any): void
  • serialize(params: any, obj: any, traditional: boolean, scope?: any): void
  • Parameters

    • params: any
    • obj: any
    • traditional: boolean
    • Optional scope: any

    Returns void

  • Parameters

    • params: any
    • obj: any
    • traditional: boolean
    • Optional scope: any

    Returns void

  • Parameters

    • params: any
    • obj: any
    • traditional: boolean
    • Optional scope: any

    Returns void

Object literals

ajaxSettings

ajaxSettings: object

beforeSend

beforeSend: empty = this.empty

cache

cache: boolean = true

complete

complete: empty = this.empty

context

context: any = <any>null

crossDomain

crossDomain: boolean = false

error

error: empty = this.empty

global

global: boolean = true

processData

processData: boolean = true

success

success: empty = this.empty

timeout

timeout: number = 0

type

type: string = "GET"

xhr

  • xhr(): XMLHttpRequest
  • Returns XMLHttpRequest

accepts

accepts: object

html

html: string = this.htmlType

json

json: string = this.jsonType

script

script: string = "text/javascript, application/javascript, application/x-javascript"

text

text: string = "text/plain"

xml

xml: string = "application/xml, text/xml"