Work in Progress: How to Ping an API
As a Computed Field:
return fetch('https://example.com/api', {
method: 'POST', // or 'GET'
headers: {
'Content-Type': 'application/json' // Common example of a header
},
body: JSON.stringify({ key: 'value' }), // For sending some data
})
.then(response => response.json()) // This just turns the response into JSON data
.then(data => { /* Do something with data */ })As an Action:
Step 1: Create the Data Output
Step 2: Write your Code
Step 3: Trigger it!
PreviousWork in Progress: How to Create Computed FieldsNextWork in Progress: How to Store a Password
Last updated