REST APIs can be consumed by using  HttpWebRequest, WebClient or HttpClient.

Before diving into details, here is quick summary

  • System.Net.WebRequest is an abstract class
  • System.Net.HttpWebRequest and System.Net.FileWebRequest will inherit the WebRequest.
  • System.Net.WebClient higher-level abstraction built on top of HttpWebRequest.
  • System.Net.Http.HttpClient is available from 4.5
  • System.Web.HttpRequest class enables ASP.NET to read the HTTP values sent by a client during a Web request.
  • System.Web.HttpResponse class encapsulates HTTP-response information from an ASP.NET operation.

Continue reading