HTTPSecureSocket.Post

From Xojo Documentation

Method

HTTPSecureSocket.Post(URL as String)

Supported for all project types and targets.

Asynchronously sends a POST command to the URL. When the page content is received, the HTTPSecureSocket.PageReceived event handler is called.


Method

HTTPSecureSocket.Post(URL as String, File As FolderItem)

Supported for all project types and targets.

Asynchronously sends a POST command to the URL. Results are downloaded directly to the FolderItem.

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

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


Method

HTTPSecureSocket.Post(URL as String, TimeOut as Integer) As String

Supported for all project types and targets.

Synchronously issues a POST command to the URL and returns the a String that contains the response. 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.Post(URL as String, File As FolderItem, TimeOut as Integer) As Boolean

Supported for all project types and targets.

Synchronously issues a POST command to the URL and downloads the result 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 versions of this method, set the HTTPSecureSocket.Yield property to True to allow for background activities while waiting.