简体   繁体   中英

Try to understand HttpWebRequest.GetResponseStream

i am trying to understand how GetResponseStream works.

when I do request.GetResponseStream, does it download all the data then return the Stream object?

GetResponseStream returns a stream from which you can read the response. Internally, it can work any way it wants to. It can read the entire stream from the server before you call GetResponseStream, it can do it when you call GetResponseStream, it can do it later when you read from the stream. No guarantees are made as to how and when it will read from the server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM