Web: consume REST API

Hello community
I am new to Xojo and was able to attend the MBS2024 conference in Germany last week. On the training day we had a nice example of how to call a REST API from a desktop app. I was able to reproduce and extend this in my desktop projects.

Now my question: I did not find the same component in the library in Xojo web projects. Is it still possible to call a REST API in web projects?

Daniel

Translated with DeepL.com (free version)

Could you tell us more about what components you need ?

We have used the “URLConnection” in the Desktop App to receive data from a REST API.
Exists a simlar component as “URL Connection” for the Web Apps?

Code von MBS-Blog

Yes, URLConnection is available in Xojo Web too.

Maybe Xojo could add some URLConnection examples for Web as it seems that only Desktop and Android are available (doing a URLConnection search on the Examples).

Thank you for the hint.
As I didn’t see the control in the library to drag and drop to a webpage, I worked like this: Added a new class with super “URLConnection”. So now the class appears in my project and i can drag and drop it to a webpage and can use it the same way as in the desktop-project.

Thanks for your support.

A Web App can ever receive a URLConnection from itself. I have used this for a demo WebApp.