FileDate Associated with a File Downloaded via WebRequest

  • Thread starter Thread starter eBob.com
  • Start date Start date
E

eBob.com

I would like to get the date (created or lastmodified, I'm not fussy)
associated with a file which I download via a WebRequest.

My URL is http://path.jpg. I create the WebRequest by
wrq=WebRequest.Create(URL). I found that WebRequest has a Headers property
but I am not sure if that is the place to look. I did manage to find
"headers" for Host and something else (maybe Connection), but no Date. And
also, when I tried to dive deeper than Headers (in the documentation) I got
lost.

I don't know much about the server which I am getting the file from, but I
doubt that I can use FTP.

So ... getting a file via WebRequest, can I get a date associated with the
file? And, if so, where do I find some documentation on how to find it?

Thanks, Bob
 
I haven't tried it yet but I think I have found what I am looking for:
HttpWebResponse.LastModified.

Bob
 
Back
Top