Custom toolbar panel - HTTP request call from Javascript within panel's code...possible?

I would like to make this experiment, but I don’t know if any of you guys already did. I would like to make an AJAX call or HTTP request call to a webservice from within a custom Panel within MSFS, is this possible?..(I think probably…but I’m not sure if any had already experimented with this idea)

Any advice would be appreciated.

Manuel

XMLHttpRequest and fetch() both work fine. There is a major caveat that the Origin header for each request is set to ‘coui://html_ui’ which may cause CORS issues depending on the API you are accessing. If you can have your API endpoint accept that Origin or if you can disable CORS for that API path then you might have some success.