Table of Contents

TTMSFNCCloudBaseRequest Class

Encapsulates all parameters needed to describe and configure an HTTP request, including URL components, method, headers, post data, upload sources, and user data slots.

API unit family: TMSFNCCloudBase

Syntax

TTMSFNCCloudBaseRequest = class

Properties

Name Description
Agent The HTTP User-Agent string sent with the request.
ConnectTimeout The maximum time in milliseconds to wait for the initial connection to succeed. Use 0 for no timeout.
CustomHeaders When True, the request uses the custom headers defined in Headers instead of any default headers.
DataBoolean General-purpose Boolean slot for attaching caller-controlled state to the request. True when the caller has set this flag; False by default.
DataInt64 General-purpose 64-bit integer slot for attaching caller-controlled numeric data to the request.
DataInteger General-purpose integer slot for attaching caller-controlled numeric data to the request.
DataObject General-purpose object reference slot for attaching caller-controlled objects to the request.
DataPointer General-purpose pointer slot for attaching caller-controlled data to the request.
DataString General-purpose string slot for attaching caller-controlled text to the request.
DataUpload File reference used as the upload source for file-based upload requests.
Headers The collection of custom HTTP headers to include with the request.
Host The host name or IP address of the target server.
Method The HTTP method used for the request. Defaults to rmGET.
Name An optional logical name for the request, used to identify it in callbacks and logs.
Path The URL path component of the request, beginning with a forward slash.
Port The TCP port number of the target server. Use 0 to apply the scheme default.
PostData The raw POST body content to send with the request.
Query The URL query string component of the request, without the leading question mark.
ReadTimeout The maximum time in milliseconds to wait for data after the connection is established. Use 0 for no timeout.
ResultFile The local file path where the response body is saved when ResultType is rrtFile.
ResultFileSize The maximum number of bytes to receive when saving the response to a file. Use 0 for unlimited.
ResultType Specifies how the response body is captured: as a string, a stream, or saved to a file. Defaults to rrtString.
UploadFile File reference for the file to upload with the request.
UploadStream The in-memory stream used as the upload body for stream-based upload requests.

Methods

Name Description
AddBasicAuthHeader Adds an HTTP Basic Authorization header using Base64-encoded credentials and returns the created header object.
AddHeader Adds a custom HTTP header to the request and returns the created header object.
Clear Resets all request properties to their default values.
ClearHeaders Removes all custom HTTP headers from the request.
GenerateHeaders Builds and returns the HTTP header block as a single formatted string.
GetMethodString Returns the HTTP method name string corresponding to the current Method value, such as GET or POST.
GetPort Returns the effective port number, using the scheme default when Port is not explicitly set.
GetQueryPath Returns the path and query portion of the URL.
GetServer Returns the server authority portion of the URL, combining host and port.
GetURL Returns the fully composed URL for this request, combining scheme, host, port, path, and query.
HasUploadFile Returns True when a file path for uploading has been assigned to this request.
HasUploadStream Returns True when an in-memory upload stream has been assigned to this request.