Language

InvokeResponse<TBody>(Int32, TBody) Constructor

Definition

Represents a strongly-typed response returned from an invocation handler.

public InvokeResponse(int status, TBody? body = default);
new Microsoft.Teams.Apps.InvokeResponse<'Body> : int * 'Body -> Microsoft.Teams.Apps.InvokeResponse<'Body>
Public Sub New (status As Integer, Optional body As TBody = Nothing)

Parameters

status
Int32

The HTTP status code indicating the result of the invoke operation (e.g., 200 for success).

body
TBody

Optional strongly-typed response payload that will be serialized and sent to the client.

Remarks

The strongly-typed Body property provides compile-time type safety while maintaining a single storage location through the base class. Both the typed and untyped Body properties access the same underlying body.

Applies to