Reading GET response as string using System.Net.HttpWebRequest

suggest change
string requestUri = "http://www.example.com";
string responseData;

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(parameters.Uri);
WebResponse response = request.GetResponse();

using (StreamReader responseReader = new StreamReader(response.GetResponseStream()))
{
    responseData = responseReader.ReadToEnd();
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents