다음을 통해 공유


HttpRequestDataExtensions.ReadFromJsonAsync Method

Definition

Overloads

ReadFromJsonAsync<T>(HttpRequestData, CancellationToken)

Reads the request using the default ObjectSerializer configured for this worker.

ReadFromJsonAsync<T>(HttpRequestData, ObjectSerializer, CancellationToken)

Reads the request using the provided ObjectSerializer.

ReadFromJsonAsync<T>(HttpRequestData, CancellationToken)

Source:
HttpRequestDataExtensions.cs

Reads the request using the default ObjectSerializer configured for this worker.

public static System.Threading.Tasks.ValueTask<T?> ReadFromJsonAsync<T> (this Microsoft.Azure.Functions.Worker.Http.HttpRequestData request, System.Threading.CancellationToken cancellationToken = default);
static member ReadFromJsonAsync : Microsoft.Azure.Functions.Worker.Http.HttpRequestData * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'T>
<Extension()>
Public Function ReadFromJsonAsync(Of T) (request As HttpRequestData, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of T)

Type Parameters

T

The target type of the JSON value.

Parameters

request
HttpRequestData

The request to be read.

cancellationToken
CancellationToken

A token that may be used to cancel the read operation.

Returns

A ValueTask<TResult> representing the asynchronous operation.

Applies to

ReadFromJsonAsync<T>(HttpRequestData, ObjectSerializer, CancellationToken)

Source:
HttpRequestDataExtensions.cs

Reads the request using the provided ObjectSerializer.

public static System.Threading.Tasks.ValueTask<T?> ReadFromJsonAsync<T> (this Microsoft.Azure.Functions.Worker.Http.HttpRequestData request, Azure.Core.Serialization.ObjectSerializer serializer, System.Threading.CancellationToken cancellationToken = default);
static member ReadFromJsonAsync : Microsoft.Azure.Functions.Worker.Http.HttpRequestData * Azure.Core.Serialization.ObjectSerializer * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'T>
<Extension()>
Public Function ReadFromJsonAsync(Of T) (request As HttpRequestData, serializer As ObjectSerializer, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of T)

Type Parameters

T

The target type of the JSON value.

Parameters

request
HttpRequestData

The request to be read.

serializer
ObjectSerializer

The ObjectSerializer to use for the deserialization.

cancellationToken
CancellationToken

A token that may be used to cancel the read operation.

Returns

A ValueTask<TResult> representing the asynchronous operation.

Applies to