Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3780

Get urlconnection runtime error in debugger only ....?

$
0
0

Happy seasons to all :slightly_smiling_face:

Here I have a very short code that runs as a build but not in the debugger:

Try
  Var response As String = http.SendSync("GET", url, 30) // Increased timeout to 30 seconds
  If http.HTTPStatusCode = 200 Then
    MessageBox("Response: " + response)
  Else
    MessageBox("Error: HTTP Status " + http.HTTPStatusCode.ToString + " - " + response)
  End If
Catch e As IOException
  MessageBox("Connection Error: " + e.Message)
End Try

The message is: “Network connection interrupted” - but in debug only. B.t.w.: What happened to the simple urlconnection.send command? Is in the docs but doesn’t compile any more?

Thanks fo any answer.

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 3780

Trending Articles