Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Cue the extraordinary. Show-stopping experiences that raise the digital bar. Apply now for the 2023 Adobe Experience Maker Awards.

Add custom header in Adobe IO call

Avatar

Level 1

Hi Team,

 

My requirement is to set a custom header in the request which Adobe IO makes to the 3rd party API. It is a GET request. Can anyone suggest how can i achieve this. This is Adobe provided code-base, so i am not able to find where is the actual request getting triggered in Adobe IO.

 

Regards,

Saleem

3 Replies

Avatar

Employee

Hi @saleemr22640314 - is your question specifically about writing an Adobe I/O Runtime action making GET requests to 3rd party API? The action is written in node.js, and you could leverage any HTTP request library such as node-fetch.

If you ask about other Adobe I/O services, please post this to the respective forum so that those teams will provide more specific support.

Avatar

Level 1
This question is specifically about Adobe I/O Runtime. GET request call to 3rd party API is already there and it is working, we only need to pass a custom header with that call.

Avatar

Employee

Ok - as mentioned earlier you could add custom headers using any HTTP lib. Example with node-fetch:

fetch('https://example.com/getUser', {
    method: 'get',
    headers: { 'X-My-Custom-Header': 'value-v' }
})

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now