TTMSMCPResourceMethod Event Type
Anonymous method that produces the content of a resource for the address that was requested.
API unit family: TMS.MCP.Resources
Remarks
The handler runs on the thread that is serving the request. An exception raised inside it is turned into a failed-operation error carrying the exception message, so raise a protocol error explicitly when a more specific code is wanted.
Parameters
| Name | Description |
|---|---|
URI |
Address the client asked for. For an entry published as a template this is the expanded address rather than the template, so the handler has to pull the variable parts out of it itself. |
Returns
A newly created content object. Ownership passes to the caller, which converts it and frees it, so the handler must not keep or reuse the instance it returns. Returning nil is reported to the client as a failed operation, error code -32004.