in Xojo, the code below ALWAYS throws an Exception at runtime, But I can paste Sql line into browser and it works fine. I think I saw someone else on the forum had a similar issue but I never saw a resolution. Does anyone have any ideas, much appreciated.
Roger
M1 Mac OS 12.2.1
Xojo 2021 3.1
Sql = "https://www.xxxxxx.com/file_name.php?db="+Sql
try
tmpString = netConnect.SendSync("GET", Sql, 30) < - Error Here !
// netConnect is a URLConnection
Catch err As InvalidArgumentException
MessageBox(err.message + " Error No.: " + err.ErrorNumber.ToString)
end try
When you paste something into a browser address bar, typically a browser will automatically add URL Encoding for you (even though the browser may not show the encoding, i.e., Safari). The encoding will ‘escape’ characters like spaces and special or reserved characters that are not compatible with a URL. Your code example does not show any of that work being done before calling SendSync.