A Fetch component lets you pull live data from a third-party REST API endpoint directly into your app.
Before you can use the Fetch component, you'll need to set up your REST Services & Endpoints.
Once you have a Service and Endpoint configured, you can add a Fetch component to your screen. The Fetch component allows you to select the Service and Endpoint, and pass data to any query parameters you specified.
After you've configured the Service and Endpoint, the data returned in the response will be available to any components you nest inside the Fetch component - such as a List
|Service||Name of the REST API service you have created inside the Draftbit app.|
|Endpoint||Name of the API endpoint to fetch data|
|Query Params||Option available if the endpoint has a query parameter attached to it. For example, |
|Poll Interval||Allows defining a value in milliseconds (ms) to refetch data in the background at a time interval from the endpoint. For example, if you set the value to |
|On Data||Executes when data has been successfully loaded.|
|On Processing(1xx).||Executes when the response status is 1xx (informational response)|
|On Success (2xx).||Executes when the response status is 2xx (successful)|
|On Redirect (3xx).||Executes when the response status is 3xx (redirection)|
|On Request Error (4xx).||Executes when the response status is 3xx (client error)|
|On Unauthorized Request.||Executes when the response status is 401|
|On Not Found (404).||Executes when the response status is 404|
|On Server Error (5xx).||Executes when the response status is 5xx (server error)|
Learn how to set and use the Fetch and List component in Fetching Data.
Updated 3 months ago