Mention what errors are you getting.
Provide a sample project with description of what you are trying to do.
Check the examples that Xojo offers, this is the code in one of them:
Var content As String = WebConnection.SendSync("GET", URLField.Text, 30)
ContentArea.Text = content
Providing a desktop example will be useless: the code comes from the Documentation “as is”. It is in a button. the project holds only that button… not even saved !
and…
the documentation for URLConnection (top of page):
Class
URLConnection
REST
Description
Used to send and receive data using the HTTP 1.1+ protocol.
Properties
When I came back to the Documentation, the page (or my hand on the Mouse moves) was displaying the previous entry/entries and I saw:
Var connection As New URLConnection
And that seems to be the solution/answer / the missing line.