title: GET : Getting an http response in C#
body: <pre><code>WebRequest req = WebRequest.Create(&quot;[URL here]&quot;);
  WebResponse rep = req.GetResponse();
  </code></pre>
  <p>I wanted some insights into the relevance of the GetResponse method, it appears to deprecated now.</p>
  <p>This other method I hacked together gets the job done.</p>
  <pre><code>HttpWebRequest request = (HttpWebRequest) WebRequest.Create(String.Format(&quot;http://mywebservicehere/dostuff?url=https://www.website.com&quot;));
  request.Method = &quot;GET&quot;;
  
  using (var response = (HttpWebResponse) (await Task&lt;WebResponse&gt;.Factory.FromAsync(request.BeginGetResponse, request.EndGetResponse, null)))
  {                
      var encoding = ASCIIEncoding.ASCII;
      StreamReader reader = new StreamReader(response.GetResponseStream(), encoding);
  }
  </code></pre>
  <p>Wanted to know of any alternative methods others may have used? Thanks for the help!</p>