Table of Contents

TTMSFNCCustomRESTClient Class

Base component that configures and executes HTTP requests.

API unit family: TMSFNCRESTClient Inherits from: TTMSFNCCustomComponent

Syntax

TTMSFNCCustomRESTClient = class(TTMSFNCCustomComponent)

Properties

Name Description
ExecutedRequests Gets or sets the executed request history.
Request Gets or sets the request configuration used by the client.
Version Gets the component version string.

Methods

Name Description
Clear Clears the current request and the executed request history.
ExecuteRequest Executes the configured request and returns the tracked request entry.
ExecuteRequestWithResultFile Executes the configured request and writes the response to a file.
ExecuteRequestWithResultStream Executes the configured request and reads the response into a stream.
ExecuteRequestWithResultString Executes the configured request and reads the response as text.
GetExecutedRequestByURL Returns the most recent executed request with the specified URL.
LoadRequest Loads a saved request definition.

Events

Name Description
OnExecuteRequest Fires before the low-level request is executed.
OnRequestHeadersChanged Fires when request headers change.
OnRequestResponseFileRetrieved Fires after a file response is retrieved.
OnRequestResponseRetrieved Fires after a response is retrieved with all response targets available.
OnRequestResponseStreamRetrieved Fires after a stream response is retrieved.
OnRequestResponseStringRetrieved Fires after a text response is retrieved.
OnRequestURLChanged Fires when the request URL changes and allows the URL to be adjusted.