3rd party api help please

The api i am trying to connect to uses setRequestHeader in which I use my api key. How do i translate that to wix code?

xmlhttp.open(“GET”, “https://api-url.somthing/”, true);
xmlhttp.setRequestHeader(“client-id”, “mykey”);
xmlhttp.send();

Thanks for your help.

The Example: Stripe Payment Processing illustrates how to use wix-fetch with the API key in the header. See the file stripeProxy.jsw in the Backend section of the Site Structure panel.

Good luck,

Yisrael

Thanks Yisrael. You helped alot.