C# - WebRequest vs. WebClient vs. HttpClient

Class
WebRequest
WebClient
HttpClient
Namespace
System.Net
System.Net
System.Net.Http
Framework version
1.1
1.1
4.5
Supported Protocols
http://
http://
http://
ftp://
ftp://
file://
file://
Supports synchronous?
Yes.
Yes.
No.
Supports asynchronous?
Yes.
Yes.
Yes.
Using IAsyncResult.
1. Using .NET events on the WebClient class.
Using Task<T>.
2. Using Task<T>.

Ads by Google


Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath