You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* q: 'select * from geo.places where text="sunnyvale, ca"'
25
+
* }
26
+
* }).then(function(response){
27
+
* console.log( response.query.count ); // => 2
28
+
* });
29
+
* ```
30
+
*
31
+
* @param {can-util/typedefs/ajaxOptions} ajaxOptions Configuration options for the AJAX request.
32
+
* - __url__ {String} The requested url.
33
+
* - __type__ {String} The method of the request. Ex: `GET`, `PUT`, `POST`, etc. Capitalization is ignored. Default is `GET`.
34
+
* - __data__ {Object} The data of the request. If data needs to be urlencoded (e.g. for GET requests or for CORS) it is serialized with [can-util/js/param].
35
+
* - __dataType__ {String} Type of data. Default is `json`.
36
+
* - __crossDomain__ {Boolean} If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of crossDomain to true. This allows, for example, server-side redirection to another domain. Default: `false` for same-domain requests, `true` for cross-domain requests.
37
+
* - __timeout__ {Number} Set a timeout (in milliseconds) for the request. A value of 0 means there will be no timeout.
38
+
* - __timeoutFn__ {Function} Timeout callback to be called after `xhr.abort()`.
39
+
* - __success__ {Function} A function to be called if the request succeeds. The function gets passed one argument based on content type: `xhr.responseText`, `xhr.responseXML` or parsed JSON.
40
+
* - __error__ {Function} A function to be called if the request fails. The function receives three arguments: `xhr`, `xhr.status` and `xhr.statusText`.
41
+
* - __complete__ {Function} A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: `xhr`, `xhr.statusText`.
* @return {Promise} A Promise that resolves to the data. The Promise instance is abortable and exposes an `abort` method. Invoking abort on the Promise instance indirectly rejects it.
0 commit comments