Methods
get
- get(callback?: function): Xhr
-
Parameters
-
Optional callback: function
-
- (err: any, data: any): void
Returns Xhr
header
- header(name: string): string
- header(name: string, value: string): Xhr
-
Parameters
Returns string
-
Parameters
-
name: string
-
value: string
Returns Xhr
mimeType
- mimeType(): string
- mimeType(type: string): Xhr
-
Returns string
-
Parameters
Returns Xhr
on
- on(type: "beforesend"): function
- on(type: "progress"): function
- on(type: "load"): function
- on(type: "error"): function
- on(type: string): function
- on(type: "beforesend", listener: function): Xhr
- on(type: "progress", listener: function): Xhr
- on(type: "load", listener: function): Xhr
- on(type: "error", listener: function): Xhr
- on(type: string, listener: function): Xhr
-
Parameters
Returns function
-
- (request: XMLHttpRequest): void
-
Parameters
Returns function
-
- (request: XMLHttpRequest): void
-
Parameters
Returns function
-
Parameters
Returns function
-
Parameters
Returns function
-
Parameters
-
type: "beforesend"
-
listener: function
-
- (request: XMLHttpRequest): void
Returns Xhr
-
Parameters
-
type: "progress"
-
listener: function
-
- (request: XMLHttpRequest): void
Returns Xhr
-
Parameters
-
type: "load"
-
listener: function
Returns Xhr
-
Parameters
-
type: "error"
-
listener: function
Returns Xhr
-
Parameters
-
type: string
-
listener: function
Returns Xhr
post
- post(data?: any, callback?: function): Xhr
- post(callback: function): Xhr
-
Parameters
-
Optional data: any
-
Optional callback: function
-
- (err: any, data: any): void
Returns Xhr
-
Parameters
-
callback: function
-
- (err: any, data: any): void
Returns Xhr
response
- response(): function
- response(value: function): Xhr
-
Returns function
-
- (request: XMLHttpRequest): any
-
Parameters
-
value: function
-
- (request: XMLHttpRequest): any
Returns Xhr
responseType
- responseType(): string
- responseType(type: string): Xhr
-
Returns string
-
Parameters
Returns Xhr
send
- send(method: string, data?: any, callback?: function): Xhr
- send(method: string, callback: function): Xhr
-
Parameters
-
method: string
-
Optional data: any
-
Optional callback: function
-
- (err: any, data: any): void
Returns Xhr
-
Parameters
-
method: string
-
callback: function
-
- (err: any, data: any): void
Returns Xhr