I am trying to send a JSON string to a cloud server. If I paste the URL string into a browser, I get ‘OK’ back which is expected. When it executes in my Xojo app, I get an error 12005 that says “The URL is invalid.” My code is
var url As String = “https:ezmeter.net/kwhuploader.php?MeterData=” + Reading.ToString
URLConnect = new myURLConn
URLConnect.Send(“GET”, url, 60)
and the URL that I pasted in the browse (copied from the debugger) is
https:ezmeter.net/kwhuploader.php?MeterData=[{“SerNo”:“220414010”},{“Data”:[{“MB”:131,“When”:“2022-04-14 14:47:01”,“Port”:“B”,“KWH”:398960,“Hex”:“hex”,“Note”:“”},{“MB”:144,“When”:“2022-04-14 14:47:01”,“Port”:“A”,“KWH”:10241201,“Hex”:“hex”,“Note”:“”}]}]
myURLConn is a subclass of URLConnection that handles the ‘OK’ response. ‘Reading’ is the name of the JSONItem.