new Ajax(options)
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
options |
* |
Properties
|
Fires:
- event:success
- event:error
Methods
-
<static> get(options)
-
Helper for get
Parameters:
Name Type Description options* Properties
Name Type Description urlstring authstring Authorisation as btoa("username:password");
dataTypestring The type of data that you're expecting back from the server, default JSON
successstring errorstring options* get options
-
<static> getCORS(url, callback)
-
Helper to get cors header
Parameters:
Name Type Description urlstring callbackstring -
send(url, data, options)
-
Send an ajax request (GET)
Parameters:
Name Type Description urlstring data* Data to send to the server as key / value
options* a set of options that are returned in the
Properties
Name Type Description abortboolean false to prevent aborting the current request, default true
Fires:
- event:success
- event:error