MSHTML - capturing a download ?



I am using a TWebBrowser to post some information to a web server that
is kicking back a download. I would like to capture the download and
process it in my application.

At present a "File Download" dialog appears with buttons for Open,
Save, Cancel, More Info. The actual download is an xml file. Is
there a way to grab the download into a TStringList or an xml parser ?

The response from server being passed to the WebBrowser is:

+++RESP 4696+++
HTTP/1.1 200 OK
Date: Fri, 29 Feb 2008 20:10:19 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Content-Disposition: attachment; filename="D:\inetpub\foobar\Admin
\extracts\League1.xml"
Content-Type: application/x-msdownload
Content-Length: 1907
Connection stored: 4696
+++CLOSE 4696+++
Client Connection Reused: 2
Client closed: total 0
.


Quantcast