Hi,
Can someone help me on this.
I need to make here a log when request is start and when is end. I want to see how much time is taken for request/response.
WebResponse response = webRequest.GetResponse();
//Console.WriteLine(((HttpWebResponse)response).StatusDescription);
// Get the stream containing content returned by the server.
Stream dataStreamResponse = response.GetResponseStream();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(dataStreamResponse);
// Read the content.
string responseFromServer = reader.ReadToEnd();
// Display the content.
Console.WriteLine(responseFromServer); //<----
// Clean up the streams.
reader.Close();
dataStreamResponse.Close();
response.Close();