WIn8上数据请求方式请求方式。

From the .NET FrameWork.

WebRequest:没有UserAgent属性,HttpWebRequestUserAgent属性,


HttpWebRequest:WebRequestHTTP实现,这正好说明了,UserAgentHTTP的一部分。


WebClient:是对HttpWebRequest的进一步封装,而WebClient中又多出一种设置UserAgent的形式


HttpClient: is amodern HTTP client for .NET. It providesa flexible and extensible API foraccessing all things exposed through HTTP.

It   is the main class for sending and receiving HttpRequestMessages and HttpResponseMessages. If you are used to usingWebClient or HttpWebRequest then it is worth noting that HttpClient differs insome interesting ways – here’s how to think about an HttpClient:
  1. An HttpClient instance is the place to configure extensions, set default headers, cancel outstanding requests and more.同意处理
  2. You can issue as many requests as you like through a single HttpClient instance.,支持单实例的并发
  3. HttpClients are not tied to particular HTTP server or host; you can submit any HTTP request using the same HttpClient instance.
  4. You can derive from HttpClient to create specialized clients for particular sites or patterns,可以自定义派生类
  5. HttpClient uses the new Task-oriented pattern for handling asynchronous requests making it dramatically easier to manage and coordinate multiple outstanding requests.
From the control.
WEBBrowser:通过webbrowser来加载和显示数据,完整的封装。detail please see http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx

HttpWebRequest vs Microsoft.XMLHTTP
HttpWebRequest and HttpWebResponse are the way to go if you want to use pure .NET. 
XmlHttp uses the Microsoft unmanaged XML parser DLL. detail please see the http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx

你可能感兴趣的:(WIn8上数据请求方式请求方式。)