App using HandleURL on Xojocloud

Hello Forum,

I have created a simple web service app as below and found it works perfect on the local server. Whenever I tried to deploy the app to Xojo Cloud, I receive an error saying “deploy was not successful so try again later” or sometimes do not receive errors but the app doesn’t work. I would appreciate any help on the issue.

Select Case request.path

Case “param”
// receive three input parameters in json
Var data As String = Request.Body.DefineEncoding(encodings.UTF8)
Dim param() As Variant = ParseJSON(data)

// simple calculation
Dim result() As Double = array(val(param(0))^2,val(param(1))^2,val(param(2))^2)

// send back results in json
Var output As String = GenerateJSON(result)

End Select

Response.Status = 200
Return True


1 Like

Hi Choonsik, I will take a look at your server then contact you.

IIRC In your HandleURL event, you must return False if the path is an empty string or just ignore the error because it relies on a session spinning up to know if the app is working properly.

You could probably count the empty string path requests and return True after 5 or so to clear this up too.

1 Like