Table of Contents

TTMSMCPResourceContent Class

The actual content read from a resource: the address it came from, its media type, and either text or binary data.

API unit family: TMS.MCP.Resources Inherits from: TPersistent

Syntax

TTMSMCPResourceContent = class(TPersistent)

Remarks

An instance is created by a handler, one per read, and the caller that requested the read converts and frees it. Text and binary content are mutually exclusive: assigning one clears the other, so the same instance cannot carry both.

Properties

Name Description
Blob Payload as Base64-encoded binary data.
MimeType Media type of the payload. Left out of the result when empty.
Text Payload as text.
URI Address this content was read from, echoed back to the client so it can tell the pieces of a read apart.

Methods

Name Description
FromBlob Creates a content object holding binary data.
FromText Creates a content object holding text.
ToJSON Builds the object sent back to the client for one read.

Used by