In short, HttpWebRequest gives you more fine grained control over your
request. WebClient does not. It encapsulates most of the stuff for you.
WebClient is very useful if you want to do specialized, one-off tasks, eg:
download file, do forms post etc.
HttpWebRequest is useful if you want to do more complicated stuff.
--
feroze
-----------------
This posting is provided as-is. It offers no warranties and assigns no
rights.
See
http://weblogs.asp.net/feroze_daud for System.Net related posts.
----------------
"Jason Manfield" <Ja***********@ discussions.mic rosoft.com> wrote in message
news:E7******** *************** ***********@mic rosoft.com...
What is the difference (pros and cons) between retrieving data from the
web
using System.Web.WebC lient and using HttpWebRequest and Response to get
the
data? The WebClient download methods seem to neatly encapsulate the
multiple
steps (request.Create ; request.GetResp onse; response.GetRes ponseStream
...)
required with the traditional HttpWebRequest/Response approach. I am
trying
to crawl urls and download data.