Can I use xmlhttprequest in browser(frontend) rather than node(backend)?

I’m running my theia in the cloud. How can I to post a request to other website in my frontend code via xmlhttprequest or https?

Hi @inlann thank you for your question.

Yes you can use the usual browser API to do http requests to all kinds of websites. Instead of XHR I would recommend you to use the newer fetch API. You can see it in action in one of our open PRs. Please keep CORS in mind, see this discussion in the Theia GitHub repo.

1 Like

Really appreciate!