Share via


ReceiveRequestExtensions.ReadBodyAsJson<T>(ReceiveRequest) Method

Definition

Serializes the body of this ReceiveRequest as JSON.

public static T ReadBodyAsJson<T> (this Microsoft.Bot.Streaming.ReceiveRequest request);
static member ReadBodyAsJson : Microsoft.Bot.Streaming.ReceiveRequest -> 'T
<Extension()>
Public Function ReadBodyAsJson(Of T) (request As ReceiveRequest) As T

Type Parameters

T

The type to attempt to deserialize the contents of this ReceiveRequest's body into.

Parameters

request
ReceiveRequest

The current instance of ReceiveRequest.

Returns

T

On success, an object of type T populated with data serialized from the ReceiveRequest body. Otherwise a default instance of type T.

Applies to