Back to Website
Show / Hide Table of Contents

Interface IAuWidgetAjaxConfig

Provides properties that are used to send requests to the server and receive responses. You can use these properties in params of the AuWidgetAjax class.

The following example illustrates how you can populate a gallery with images obtained through an HTTP request.

{
  "widgets": [
   {
     "name": "gallery-images",
     "type": "ajax",
     "params": {
       "lock": "gallery",
       "url": "https://example.com/api/images?subfolder=cats",
       "method": "GET",
       "responseType": "json"
     }
   }
 ]
}
Package: ui-framework

Properties

enabled

If false, the request will not be executed. The default value is true.

Declaration
enabled: boolean
Property Value
Type Description
boolean

If false, the request will not be executed. The default value is true.

headers

A dictionary of HTTP headers sent along with the request (an object with the keys used as a header name and a value used as a header value).

Declaration
headers: [key: string]: string
Property Value
Type Description
[key: string]: string

A dictionary of HTTP headers sent along with the request (an object with the keys used as a header name and a value used as a header value).

lock

The widget names that should be locked while waiting for the response. The editor will show a preloader on this widget.

Declaration
lock: string[] | string
Property Value
Type Description
string[] | string

The widget names that should be locked while waiting for the response. The editor will show a preloader on this widget.

method

An HTTP method like POST, GET, etc. The default value is POST.

Declaration
method: string
Property Value
Type Description
string

An HTTP method like POST, GET, etc. The default value is POST.

onError

A function ("{{#function <expression>}}") or an array of functions that should work when the request fails.

Declaration
onError: Function | Array<Function>
Property Value
Type Description
Function | Array<Function>

A function ("{{#function <expression>}}") or an array of functions that should work when the request fails.

onSuccess

A function ("{{#function <expression>}}") or an array of functions that work after the successful request.

Declaration
onSuccess: Function | Array<Function>
Property Value
Type Description
Function | Array<Function>

A function ("{{#function <expression>}}") or an array of functions that work after the successful request.

request

The request body. Typically, you put a JSON here that consists of references to other widgets.

Declaration
request: any
Property Value
Type Description
any

The request body. Typically, you put a JSON here that consists of references to other widgets.

requests

Declaration
requests: Array<any>
Property Value
Type Description
Array<any>

responseType

Defines how to interpret the response received from the server.

Declaration
responseType: ResponseType
Property Value
Type Description
ResponseType

Defines how to interpret the response received from the server.

url

A URL that is used to accept requests.

Declaration
url: string
Property Value
Type Description
string

A URL that is used to accept requests.

Was this page helpful?
Thanks for your feedback!
In This Article
  • Properties
    • enabled
    • headers
    • lock
    • method
    • onError
    • onSuccess
    • request
    • requests
    • responseType
    • url
Back to top Copyright © 2001–2025 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback