Try with a javascript action
/**
* @param {string} uRL
* @param {string} method
* @param {string} headers
* @param {string} body
* @returns {Promise.<string>}
*/
export async function CallRestService(uRL, method, headers, body) {
// BEGIN USER CODE
if ( typeof headers == "undefined" || headers == null ) headers = "{}";
try {
headers = JSON.parse(headers);
}
catch ( err ) {
throw new Error("Headers are not valid JSON because: "+err.message);
}
const response = await fetch(uRL, {
method: method,
headers: headers,
body: body
});
const responseBody = await response.text();
return responseBody;
// END USER CODE
}