Osvaldo Aoki <email@example.com> wrote in
> I am a Software ERP developer wrotten in Alaska Xbase.
> I am analyzing Xb2Net to create a program to receive API Call (Web
> Services - JSON), and process them, return result to the caller.
> For each received Call, I think to create a Thread to attend and
> process API separated. In My system, I just have a Program that
> keep in Looping to processo all request IN and attend API Web
> service. I just want to know if any people already do it, and if
> this idea is possible to implement. Thanks
This is extremely easy to do with Xb2.NET - use the sample WEBSERVE.PRG as
your starting point.
Attached is a very simple JSON server-side PRG script. Copy the attached
file into your .\www_root folder and call the function from your JSON
client. If the client is running on the same computer as the server the URL
will be this:
Note that you can execute this from a browser. The PRG will be compiled,
but you will get the following message: "Method Not Allowed". The reason is
the web service function is expecting a POST with content-type:
When the request comes in as a POST with content-type "application/json",
the server returns the following JSON message:
industrial strength Xbase++ development tools