HTTPS and/or XML posting help please

I would like some help or guidance on either posting the following using HTTPS or XML. I have attached both examples of code and would like the easiest way to communicate with this server. Looking at the two examples, it would seem like the HTTPS code would be easier to submit (for a novice) but I need a little help with which components to use and a hint as to what to do to transmit it. I use D7 and have used Indy's FTP client (v9.00.10) to communicate with another server but that seems a little more straight-forward than using HTTPS or XML. Any help would be greatly appreciated.

When posting data on https:// connections, I usually use the TWebBrowser control . Why?? Because it happens to be in the default Delphi install and is easy to use. Additionally, the pages I normally work with sometimes have some javascript and the TWebbrowser control understands them as well.

You can add your user-agent to the Headers variable in the procedure PostSomeData, the same way as I added the Referer and Content-Type. The rest of the headers should be autogenerated by the browser.

I really meant it. You need the content type to be application/x-www-form-urlencoded because you're POSTing the data to some place (you changed it to text/xml). Also, don't set the Content-length:, Accept: or the Host: at all -- these are automatically set by the Browser object. If anything, all you need to do is set the user-agent (and even that is not necessary unless the other end checks the user-agent).

>> I wasn't sure where (if anywhere) I should put the POST /secure/WebDirectoryDownloadFromClient HTTP/1.0 statement either.
Put that as the first parameter of Navigate:
WebBrowser1.Navigate("http://www.somesite.com/secure/WebDirectoryDownloadFromClient", ....);

When I run the above code, it just hangs. Should it automatically start downloading? If so how and how can I make it not bring up the standard save dialog box and just direct it to a location to save the file?

Ok...The download procedure works...It ended up being an issue on their side.

I still have two issues though:

1) After I execute the procedure Tform1.PostSomeData below, if I run it again, it hangs. Do I need to clear it, reset it or anything? I also noticed that if I navigate to a standard URL (i.e. www.borland.com) and then execute the procedure again, it works fine.

2) How can I take control of the download? For instance, I do not want it to prompt the user if they want to save or open the file. I want to be able to start d/l the file and directing it to the folder I choose. Is this possible?