HTTPSecureSocket.Get

From Xojo Documentation

Method

HTTPSecureSocket.Get(URL As String)

Supported for all project types and targets.

Asynchronously downloads the content from URL. When the page content is received, the PageRecieved event is called.

You need to subclass HTTPSocket (or use AddHandler) so that you can handle the appropriate events.


Method

HTTPSecureSocket.Get(URL As String, File As FolderItem)

Supported for all project types and targets.

Asynchronously downloads the content from the URL directly to the FolderItem.

The DownloadComplete event is called when the response data has finished downloading.

You need to subclass HTTPSocket (or use AddHandler) so that you can handle the appropriate events.


Method

HTTPSecureSocket.Get(URL As String, Timeout As Integer) As String

Supported for all project types and targets.

Synchronously downloads the content from URL. The data is returned as a String. TimeOut is the number of seconds to wait for the result.

If Timeout is set to zero, then there is no timeout period and the socket waits until it receives the page or gets an error.

HTTPSecureSocket.ErrorCode is -1 if the Timeout value is reached.


Method

HTTPSecureSocket.Get(URL as String, file As FolderItem, timeout As Integer) As Boolean

Supported for all project types and targets.

Synchronously downloads the content from the URL directly to the FolderItem. When the download has finished, True is returned if successful, False if there was an error. TimeOut is the number of seconds to wait for the result.

HTTPSecureSocket.ErrorCode is -1 if the Timeout value is reached.

Notes

For the synchronous version of these methods, set the Yield property to True to allow for background activities while waiting.