Hello! It is necessary to receive a response from the server asynchronously and, at the same time, to know at what stage this very answer is, that is, how many bytes are currently loaded. What, for example, at any time it would be possible to limit the download speed or interrupt the receipt of the answer, or simply monitor the progress of the response loading and so on. Is it possible at all? I found an example with wpf on the Internet, but in the console version this is not possible to repeat. In principle, it makes no difference to me what to use - the webclent or webresponse or other means if they are. If someone came across such a task once - respond.

  • It was here recently, now I will look. - VladD
  • Here: ru.stackoverflow.com/a/588386/10105 (apparently duplicate). - VladD
  • Okay. And one more question on the theory. Simple, I think, but I need to understand what is happening. For example, in general, there is a link to the file: hhtp: //example.com/file.rar. My task is file download. I create a query (get). I create a variable of type webresponse. So here is what the mechanism of .Net work next? Is a region created in memory (in a heap) and that file is written there? And only then using the class strem I save it to disk to myself? In the meantime, I have not applied methods from the stream class. Is my file dangling in RAM on the heap? All right - Stanislav1987
  • Now I will see, thank you - Stanislav1987
  • Well, you get an HTTP response (as an object, it really isn't loaded yet), get Stream on its content, and just copy pieces from this stream wherever you want. - VladD

0