|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
HttpWebRequest.GetResponse()Hi all,
I am curious that if I create an HttpWebRequest object and set the Method of it to "HEAD", when I call GetResponse() do I get the whole document sent from the responding server or do I just get the Headers of the document I requested? Would this also mean, that I don't actually download any of the body of the document until I call GetResponseStream() on the HttpWebResponse object? I'm trying to limit how much data I download, as I really only need to get the URI from the HttpWebResponse object, not the entire page. Thanks, Mike Hi Mike,
The answer is that you will only get the head. See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html -- Show quoteHTH, Kevin Spencer Microsoft MVP Professional Numbskull Show me your certification without works, and I'll show my certification *by* my works. <MrMikeI***@gmail.com> wrote in message news:1143729510.943860.171210@j33g2000cwa.googlegroups.com... > Hi all, > > I am curious that if I create an HttpWebRequest object and set the > Method of it to "HEAD", when I call GetResponse() do I get the whole > document sent from the responding server or do I just get the Headers > of the document I requested? Would this also mean, that I don't > actually download any of the body of the document until I call > GetResponseStream() on the HttpWebResponse object? I'm trying to limit > how much data I download, as I really only need to get the URI from the > HttpWebResponse object, not the entire page. > > Thanks, > Mike > |
|||||||||||||||||||||||