We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
HttpResponse
1 parent bb19c13 commit 0466032Copy full SHA for 0466032
src/Orb/Core/HttpResponse.cs
@@ -22,10 +22,14 @@ public async Task<T> Deserialize<T>(CancellationToken cancellationToken = defaul
22
);
23
try
24
{
25
- return JsonSerializer.Deserialize<T>(
26
- await this.ReadAsStream(cts.Token).ConfigureAwait(false),
27
- ModelBase.SerializerOptions
28
- ) ?? throw new OrbInvalidDataException("Response cannot be null");
+ return await JsonSerializer
+ .DeserializeAsync<T>(
+ await this.ReadAsStream(cts.Token).ConfigureAwait(false),
+ ModelBase.SerializerOptions,
29
+ cts.Token
30
+ )
31
+ .ConfigureAwait(false)
32
+ ?? throw new OrbInvalidDataException("Response cannot be null");
33
}
34
catch (HttpRequestException e)
35
0 commit comments