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
BedrockMission!

Learn more

View all

Sign in to view all badges

Add custom header in Adobe IO call

saleemr22640314
Level 1
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
duypnguyen
Employee
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.

saleemr22640314
Level 1
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.
duypnguyen
Employee
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' }
})