Fetch
Scripts can use the Fetch API to make network requests to external services.
Reference Document
Example
// GET Request
const response = await fetch('https://api.github.com/orgs/vikadata');
const orgInfo = await response.json();
// POST Request
const data = {
id: 'xxx',
content: 'Test Content'
};
const response = await fetch('https://example.com/postMsg', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
});
const result = await response.json();