Re: Call REST webservice in XPA 3.3

Andreas Sedlmeier

Hi Gabor,

When I wrote REST I actually mean all Web API programming different to SOAP, since you can have XML as data exchange format with REST of course too. That does not make it SOAP then however.

One way to get Web Apis (RESTful) work with Magic is by using a API Gateway resp. a reverse proxy. You would the simply build your API as you are used too (like with Swagger or so) and the URL patterns required to map this into Magic like ?app=xxx&prg=yyyy you solve by rewriting the URLs.

Its easy when you have a "internal" webserver (IIS / Apache) connected to your Magic application server. Outside world (API clients) you serve with the API gateway resp. reverse proxy. Look into things like Kong f.i. Then it might become clear what to do.

You can also get similar functionality with MS IIS and URL rewriting. Just not that good ;)

I still have a Magic Web Api example on my todo list which is based on Docker and Kubernetes. Unfortunately getting that work with Xpa Single user on Windows is too ambitious and a sponsor for a Linux license I did not yet find ^^. 

Best regards,


Join to automatically receive all group messages.