Constructor
new AjaxSender(url, parametersopt)
Creates an instance of AjaxSender
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
String | URL to send the call to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parameters |
Object |
<optional> |
Request parameters
Properties
|
- Source:
Members
xhr :XMLHttpRequest
The request corresponding XMLHttpRequest
Type:
- Source:
Methods
asPromise() → {AjaxSender}
Sets the .send() return type to a Promise
- Source:
Returns:
The current AjaxSender
- Type
- AjaxSender
send() → {AjaxSender|Promise}
Send the request (if wait == true in init)
- Source:
Returns:
The current AjaxSender OR a Promise
- Type
- AjaxSender | Promise
stop() → {AjaxSender}
Stops any outgoing request
- Source:
Returns:
The current AjaxSender
- Type
- AjaxSender