Table of Contents

TTMSFNCCloudBaseRequestResult Class

Extends TTMSFNCCloudBaseRequest with response data, execution state, progress tracking, and result callbacks for a completed or in-progress HTTP request.

API unit family: TMSFNCCloudBase Inherits from: TTMSFNCCloudBaseRequest

Syntax

TTMSFNCCloudBaseRequestResult = class(TTMSFNCCloudBaseRequest)

Properties

Name Description
Agent The HTTP User-Agent string sent with the request. (inherited from TTMSFNCCloudBaseRequest)
Async When True, the request executes asynchronously on a background task rather than blocking the calling thread.
ConnectTimeout The maximum time in milliseconds to wait for the initial connection to succeed. Use 0 for no timeout. (inherited from TTMSFNCCloudBaseRequest)
CustomHeaders When True, the request uses the custom headers defined in Headers instead of any default headers. (inherited from TTMSFNCCloudBaseRequest)
DataBoolean General-purpose Boolean slot for attaching caller-controlled state to the request. True when the caller has set this flag; False by default. (inherited from TTMSFNCCloudBaseRequest)
DataInt64 General-purpose 64-bit integer slot for attaching caller-controlled numeric data to the request. (inherited from TTMSFNCCloudBaseRequest)
DataInteger General-purpose integer slot for attaching caller-controlled numeric data to the request. (inherited from TTMSFNCCloudBaseRequest)
DataObject General-purpose object reference slot for attaching caller-controlled objects to the request. (inherited from TTMSFNCCloudBaseRequest)
DataPointer General-purpose pointer slot for attaching caller-controlled data to the request. (inherited from TTMSFNCCloudBaseRequest)
DataString General-purpose string slot for attaching caller-controlled text to the request. (inherited from TTMSFNCCloudBaseRequest)
DataUpload File reference used as the upload source for file-based upload requests. (inherited from TTMSFNCCloudBaseRequest)
Headers The collection of custom HTTP headers to include with the request. (inherited from TTMSFNCCloudBaseRequest)
Host The host name or IP address of the target server. (inherited from TTMSFNCCloudBaseRequest)
Method The HTTP method used for the request. Defaults to rmGET. (inherited from TTMSFNCCloudBaseRequest)
Name An optional logical name for the request, used to identify it in callbacks and logs. (inherited from TTMSFNCCloudBaseRequest)
Path The URL path component of the request, beginning with a forward slash. (inherited from TTMSFNCCloudBaseRequest)
Port The TCP port number of the target server. Use 0 to apply the scheme default. (inherited from TTMSFNCCloudBaseRequest)
PostData The raw POST body content to send with the request. (inherited from TTMSFNCCloudBaseRequest)
Query The URL query string component of the request, without the leading question mark. (inherited from TTMSFNCCloudBaseRequest)
ReadTimeout The maximum time in milliseconds to wait for data after the connection is established. Use 0 for no timeout. (inherited from TTMSFNCCloudBaseRequest)
ResponseCode The HTTP status code returned by the server.
ResponseHeaders The collection of HTTP response headers returned by the server.
ResultBytesReceived The number of bytes received so far for the current response body.
ResultFile The local file path where the response body is saved when ResultType is rrtFile. (inherited from TTMSFNCCloudBaseRequest)
ResultFileSize The maximum number of bytes to receive when saving the response to a file. Use 0 for unlimited. (inherited from TTMSFNCCloudBaseRequest)
ResultStream The response body captured as a memory stream when TTMSFNCCloudBaseRequest.ResultType is rrtStream.
ResultString The response body captured as a string when TTMSFNCCloudBaseRequest.ResultType is rrtString.
ResultTotalBytes The total expected size in bytes of the response body, if reported by the server.
ResultType Specifies how the response body is captured: as a string, a stream, or saved to a file. Defaults to rrtString. (inherited from TTMSFNCCloudBaseRequest)
Running When True, the request is currently executing. Defaults to False.
Success When True, the server returned a success HTTP status code.
Task The background task handle associated with this asynchronous request.
UploadFile File reference for the file to upload with the request. (inherited from TTMSFNCCloudBaseRequest)
UploadStream The in-memory stream used as the upload body for stream-based upload requests. (inherited from TTMSFNCCloudBaseRequest)

Methods

Name Description
AddBasicAuthHeader Adds an HTTP Basic Authorization header using Base64-encoded credentials and returns the created header object. (inherited from TTMSFNCCloudBaseRequest)
AddHeader Adds a custom HTTP header to the request and returns the created header object. (inherited from TTMSFNCCloudBaseRequest)
Cancel Cancels the request if it is currently running.
CheckTaskStatus Returns True when the background task associated with this request is still active.
Clear Resets all request properties to their default values. (inherited from TTMSFNCCloudBaseRequest)
ClearHeaders Removes all custom HTTP headers from the request. (inherited from TTMSFNCCloudBaseRequest)
GenerateHeaders Builds and returns the HTTP header block as a single formatted string. (inherited from TTMSFNCCloudBaseRequest)
GetMethodString Returns the HTTP method name string corresponding to the current Method value, such as GET or POST. (inherited from TTMSFNCCloudBaseRequest)
GetPort Returns the effective port number, using the scheme default when Port is not explicitly set. (inherited from TTMSFNCCloudBaseRequest)
GetQueryPath Returns the path and query portion of the URL. (inherited from TTMSFNCCloudBaseRequest)
GetResponseHeader Returns the value of a named response header, or an empty string if the header is not present.
GetServer Returns the server authority portion of the URL, combining host and port. (inherited from TTMSFNCCloudBaseRequest)
GetURL Returns the fully composed URL for this request, combining scheme, host, port, path, and query. (inherited from TTMSFNCCloudBaseRequest)
HasUploadFile Returns True when a file path for uploading has been assigned to this request. (inherited from TTMSFNCCloudBaseRequest)
HasUploadStream Returns True when an in-memory upload stream has been assigned to this request. (inherited from TTMSFNCCloudBaseRequest)
Log Appends a message to the request log and fires the OnLog event.

Events

Name Description
CallBackProgress Callback invoked during upload or download progress, receiving this result object and the current progress fraction.
CallBackResult Callback invoked when the request completes, receiving this result object.
OnCancelled Fires when the request is cancelled before it completes.
OnComplete Fires when the request completes, whether successfully or not.
OnLog Fires when a log message is recorded for this request.
OnProgress Fires during upload or download progress, reporting the current progress fraction and direction.

Used by