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
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…