I just have started to learn to build a web service using Xojo web application. I’m trying to receive a number array (about ten parameters), calculate some results using the input parameters, and send out a resulting number array. I now have understood how to receive a single number using HandleUrl and WebRequest such as below:
Dim input As Integer = Request.Path.ToInteger
Var values() As Integer = Array(input,input2,input3,input4,input5)
Var json As String = GenerateJSON(values)
Response.Write(json)
However, I don’t know how to pass a number array not a single number. I have searched lots of Q&A in this forum and googled in the past days but not successful. Can anyone shed me some light?
Thanks for your answer! I understand I will have the other side send me a json array of numbers but I don’t understand how I code my application to receive it. I at least know I can use “Dim input As Integer = Request.Path” to receive a single number when a user do “http://127.0.0.1:8080/100” (will be diferent domain and number) to pass “100.” Maybe this is too easy and I’m missing something…
Sorry there are typos in my code above and I don’t know how to edit.
Dim input As Integer = Request.Path.ToInteger
Var values() As Integer = Array(input,input+2,input+3,input+4,input+5)
Var json As String = GenerateJSON(values)
Response.Write(json)