.NET Framework Reading GET response as string using System.Net.HttpWebRequest

Download .NET Framework for free

Example

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();
}
Reading GET response as string using System.Net.WebClient