How to use Web Edition for your own REST API
Issue: 12.5 (September/October 2014)
Author: Christian Schmitz
Author Bio: Christian Schmitz is the creator of the Monkeybread Software Xojo/Real Studio Plugins.
Article Description: No description available.
Article Length (in bytes): 10,073
Starting Page Number: 35
Article Number: 12506
12506project.zip Updated: 2014-09-02 10:53:17
Related Web Link(s):
Excerpt of article text...
With the web edition framework you get a full web server for handling web requests for free. You can use it with the
HandleSpecialURLevent in the app class. In our example, we use this event to handle requests with a REST-like API. We use JSON to package data for the transfer. This is different from a SOAP web service which uses XML for transfer.
First, the client. We take a new project and name it
client. On the main window we place a
listboxwill show the list of image file names and the
canvasshows the image (see Figure 1).
We add an
HTTPSocketto the window and name it
sock. Now in the
openevent of the window you can start a query to the server to get the list of files:
...End of Excerpt. Please purchase the magazine to read the full article.