I was testing an iOS + XOJO Web app solution with the intention of moving it to Xojo cloud.
I was using HandleSpecialURL, but there are difference between running a web app from the desktop and Xojo cloud.
I was passing strings like …/index.cgi/special/MyPath?value1=xyz to just sending the path and trying to set all the parameters for the socket (from iOS) using SetRequestContent.
I thought that would show up in the WebReqeust.entity, but it isn’t.
Can someone tell me how to extract that information?
If it is only parameters like value1=abc & value2=xyz then that should be in the URL.
However if you need to POST / PUT / DELETE some JSON content you should be able to use a xojo.Core.dictionary like this:
Dim aDictionary As New Xojo.Core.dictionary
//Set some values in the dictionary here
aDictionary.value("key") = "value"
dim postData As Text = xojo.data.GenerateJSON(aDictionary)
socket.SetRequestContent(Xojo.Core.TextEncoding.UTF8.ConvertTextToData(postData), "application/json")
Well Brian, I don’t know if this will help. I looked deeper and what I thought I was doing wrong, is exactly what I’m doing somewhere else and it’s working.
Either I’ve found an interesting bug or I’m breaking things in more places than I thought. If I did something meaningful, I’ll update this thread.