restsharp / RestSharp

Simple REST and HTTP API Client for .NET
https://restsharp.dev
Apache License 2.0
9.63k stars 2.34k forks source link

The function of AdvancedResponseWriter is different from the old version #2266

Closed colindcli closed 2 months ago

colindcli commented 2 months ago

In version 106.15.0, AdvancedResponseWriter is used to return the received data in real time, but in version 112.0.0, it is executed only after receiving all the data.

Here, I will use it to make a download progress bar. I hope you can give me some advice on how to do it.

Thank you!

tttony commented 2 months ago

I was having the same problem and fixed it by just setting the option CompletionOption in the request:

req.CompletionOption = HttpCompletionOption.ResponseHeadersRead;

colindcli commented 2 months ago

@tttony Thank you for your tips!