I am trying o create a web app that will receive meter readings from another computer and store them in a database hosted by ServerWarp. The meter reading app creates a JSONItem (named ‘upload’ and verified as valid JSON) that is sent with the following code
// This code runs in the app of a standalone web app that reads the meters on a set schedule rather that when there is an active session
dim data As Xojo.Core.MemoryBlock
data = xojo.Core.TextEncoding.UTF8.ConvertTextToData(upload.ToString.ToText)
mySoc = new MyHTTPSocket // a property of the app, MyHttpSocket is a Xojo.Net.HTTPSocket subclassed with a PageReceived event
mySoc.SetRequestContent(data, "application/json")
mySoc.Send("POST", "http://127.0.0.1:8080/special/ReadingUp")
In the web app that will run on ServerWarp (now running on the same Win 10 machine as the sending program) I have code in the app.HandleSpecialURL that should receive the code and process it. That event never fires. I have tried it with the two programs on separate machines and most recently with them both on the same machine with the sending program on port 9000 and the receiving program on 8080. I did notice that when I set it to 8080, it had defaulted to a very large port number that I did not write down. There are no other programs that use these ports running right now.
Other than code in the app.Open to connect to the ServerWarp database (completes OK) there is no other code in the program right now. I’m looking for suggestions for troubleshooting this.
Issue #2. The ServerWarp program will not have a user interface. After I deleted the default page that Xojo added when I created the project, I got nd error message that said a web page is required. Repeated attempts to insert a new web page failed, but it may have been something with my computer. I had to reboot it about ten minutes later. Do I need to leave a blank page? I have a feeling I am missing something for creating a web app that is essentially a console app.