Skip to content

Window.ajaxPromise method

Window › ajaxPromise

Official

Sends an AJAX request and returns a promise.

Signature:

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);