ajaxPromise
Official
Sends an AJAX request and returns a promise.
Example:
const response = await ajaxPromise({ url: 'https://example.com' });console.log(response);Signature:
function ajaxPromise(options: AjaxOptions): Promise<any>Parameters:
| Parameter | Type | Description |
|---|---|---|
options | AjaxOptions | The options for the AJAX request. |
Returns: Promise<any> — A promise that resolves to the response.
Example:
const response = await ajaxPromise({ url: 'https://example.com' });console.log(response);