Jaa


ReceiveRequestExtensions.ReadBodyAsJsonAsync<T>(ReceiveRequest) Method

Definition

Serializes the body of this ReceiveRequest as JSON.

public static System.Threading.Tasks.Task<T> ReadBodyAsJsonAsync<T> (this Microsoft.Bot.Streaming.ReceiveRequest request);
static member ReadBodyAsJsonAsync : Microsoft.Bot.Streaming.ReceiveRequest -> System.Threading.Tasks.Task<'T>
<Extension()>
Public Function ReadBodyAsJsonAsync(Of T) (request As ReceiveRequest) As Task(Of 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

Task<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