WebClient vs. HttpWebRequest/HttpWebResponse

Posted by Dan on Stack Overflow See other posts from Stack Overflow or by Dan
Published on 2009-11-07T20:55:49Z Indexed on 2010/03/29 3:43 UTC
Read the original article Hit count: 708

It seems to me that most of what can be accomplished with HttpWebRequest/Response can also be accomplished with the WebClient class. I read somewhere that WebClient is a high-level wrapper for WebRequest/Response. So far, I can't see anything that can be accomplished with HttpWebRequest/Response that can not be accomplished with WebClient, nor where HttpWebRequest/Response will give you more "fine-grained" control.

When should I use WebClient and when HttpWebRequest/Response? (Obviously, HttpWebRequest/Response are HTTP specific.)

If HttpWebRequest/Response are lower level then WebClient, what can I accomplish with HttpWebRequest/Response that I cannot accomplish with WebClient?

© Stack Overflow or respective owner

Related posts about webclient

Related posts about httpwebrequest