HttpRequestDataExtensions.ReadFromJsonAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Azure SDK for .NET
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin