REST Button
Queries an HTTP endpoint and stores the response.
Demo
Basic example
Attributes
Attribute | Type | Description |
---|---|---|
type | string | Type expected is restButton |
See section Common attributes.
Extra attributes
Attribute | Type | Description |
---|---|---|
autoExecute | boolean | If true, URL will be called automatically when the form is displayed |
refreshTime | number | Number of ms to wait before automatically calling again |
text | string | Text shown inside the button |
url | string | URL to call when clicked |
path | string | Where to find data in a JSON response |
valueExpression | string | Expression that returns the value to store. $response keeps the value returned by the REST call. For example {{flw.round($response.returnedValue, 2)}} . If path is defined, $response keeps the value of the REST response in that path. |
Events
Event | When | Additional | Cancellable |
---|---|---|---|
Button.click | Any button is clicked | Definition + State | Yes |
See section Events for more information.
When to use it
Use it to get values from server manually or automatically.