Action Proxy
Calling the Action Proxy
({ context }) => {
const fetchData = async () => {
try {
const response = await axiosInstance.get(`${context.apiUrl}/proxy/v1`, {
params: {
targetUrl: 'https://jsonplaceholder.typicode.com/posts/1/comments',
proxyheaders: JSON.stringify({
'Content-Type': 'application/json',
}),
workspaceId: context.workspace.id
}
});
console.log(response.data);
} catch (error) {
console.error('Error fetching data:', error);
}
};Injecting Variables via the Action Proxy
Was this helpful?