Web Services Overview
From Xojo Documentation
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 (or WebApplication.HandleSpecialURL) event handlers.
You can use/consume any web service using URLConnection, HTTPSecureSocket or Xojo.Net.HTTPSocket classes.
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 UserGuide:App Transport Security topic.
Videos
- Using the HTTPSocket
- REST Web Services Part 1
- REST Web Services Part 2
- Making Database Web Services
- Connecting to 3rd Party Web Services
- Using Slack API
- Connecting to AirTable
- Sending Email
Blogs
- Web Services, Xojo Web At Your Service
- Web Services Part II: Xojo Web At Your Service
- MultiTemp
- Quote Web Service
- Dogs Up
- Sending Notifications with PushOver
- Write a Slackbot in less than 20 lines of code
- Formatting SQL with a Web Service
- Cats Up: Using HTTPSocket with the Cat REST API
- Testing Web Services with RESTy
Docs
Example Projects
- Examples/Communication/Web Services/AirTableArtGallery
- Examples/Communication/Web Services/CatAPI
- Examples/Communication/Web Services/FeedBin
- Examples/Communication/Web Services/FormatSQL
- Examples/Communication/Web Services/RESTy
- Examples/Communication/Web Services/Slack
Open Source
See Also
URLConnection, Xojo.Net.HTTPSocket classes; UserGuide:HTTP (Web) Communication, UserGuide:App Transport Security topics