Accessing web services

Web services are APIs that exist on the web. The most common type are REST (Representational State Transfer) web services which you work with using simple HTTP requests. Also still is use is SOAP (Simple Object Access Protocol) but that is older and not quite as simple to use.

With Xojo you an create your own web services or you can use existing services.

You can create your own web services by using a web app and the WebApplication.HandleURL event handler.

You can use/consume any web service using the URLConnection class.

The specifics for how to connect to a web service varies by web service, but typically you will need to authenticate in some manner and the submit data to the web service so you can get results back.

On MacOS and iOS you need to be aware of App Transport Security which only allows secure (https) URLs to be used. You can override this with a plist for your app. For more information, refer to the Using Non-Secure URLs on macOS and iOS topic.