This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
In adobe IO action I need to fetch data from an external endpoint and return the response back to campaign standard,
I need help on this one,
Thank you !
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi El-Coder,
What do you need help with?
I need more information to be able to help you.
Regards,
Views
Replies
Total Likes
Hi,
Yes all is in place ,
I’m asking if there’s any way to get the headers data from the system that’s calling the action I’ve created.
I succeeded retrieving the payload data but still struggling to get headers data 😓
thank you for your help.
Views
Replies
Total Likes
have you tried
params['__ow_headers']
Views
Replies
Total Likes
Hello dhindle,
Thank you very much for your help, I have managed to get the header data,
I am trying to use the headers and payload data and to do this I usually use this in the function parameters, but the function does not work when I use two parameters in it:
Working : async function functionName(params)
Working : async function functionName(payload)
Not Working : async function functionName(params,payload)
Thank you for your advice.
Views
Replies
Total Likes
Correct
async function functionName(payload) <-- here you are just renaming `params` to `payload`. The contents are still the same, payload and headers.
If you debug params what attributes do you see? I think you can just filter out anything that starts with `__ow_`
Something like this:
/**
*
* Returns the parameters without `__ow` attributes.
*
* @param {object} params action input parameters.
*
* @returns {object}
*
*/
function getStrippedParams(params) {
let cleanedParams = {}
for (const attr in params) {
if (!attr.startsWith('__ow'))
cleanedParams[attr] = params[attr]
}
return cleanedParams
}
Views
Replies
Total Likes
Hello dhindle, this is brilliant 🌟
Thank you very much for your help !
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies