File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change 11using System ;
2- using System . IO ;
32using System . Net . Http ;
43using System . Text . Json ;
54using System . Threading ;
@@ -23,7 +22,7 @@ public async Task<T> Deserialize<T>(CancellationToken cancellationToken = defaul
2322 try
2423 {
2524 return JsonSerializer . Deserialize < T > (
26- await this . ReadAsStream ( cts . Token ) . ConfigureAwait ( false ) ,
25+ await Message . Content . ReadAsStreamAsync ( cts . Token ) . ConfigureAwait ( false ) ,
2726 ModelBase . SerializerOptions
2827 ) ?? throw new ArcadeInvalidDataException ( "Response cannot be null" ) ;
2928 }
@@ -33,15 +32,6 @@ await this.ReadAsStream(cts.Token).ConfigureAwait(false),
3332 }
3433 }
3534
36- public async Task < Stream > ReadAsStream ( CancellationToken cancellationToken = default )
37- {
38- using var cts = CancellationTokenSource . CreateLinkedTokenSource (
39- this . CancellationToken ,
40- cancellationToken
41- ) ;
42- return await Message . Content . ReadAsStreamAsync ( cts . Token ) . ConfigureAwait ( false ) ;
43- }
44-
4535 public async Task < string > ReadAsString ( CancellationToken cancellationToken = default )
4636 {
4737 using var cts = CancellationTokenSource . CreateLinkedTokenSource (
You can’t perform that action at this time.
0 commit comments