After calling the initial HttpWebResponse.GetResponseStream () and reading through the stream, this stream is executed and cannot be reused.
I have a situation where I need to examine the contents of a response and, if it has certain data, get another page, and then pass a new answer along the line. Otherwise, pass the original answer as is. The only problem is that after checking the response to check this "special data" this answer is not suitable for the code downstream.
The only way I can make it transparent to the downstream code is to create a HttpWebResponse derived class and somehow cache the data streams and pass that cached stream down the line instead of the initial stream, I'm not sure if this is possible even after that as I have not studied it.
Are there any alternative ways to handle this scenario?
source share