I can download the content of a webpage on site using CInternetSession and CInternetSession::OpenURL().
So far, so good.
Now on the webpage I'm interest in there is a button, which, when pressed, downloads a file to my computer. Now I would like to write a code for downloading this file. That is, I want the server to "think" I have pressed the button. I looked up through GetHttpConnection and GetHttpConnection::OpenRequest() by I coudn't find how to do it.
A button-press on a web page often sends a POST request to the server.
You can "spy" on the communications between a working browser and the server, when you press a button, to see what messages are exchanged. Then you can write your program to mimic the exchanged messages. One popular "spy" is the Fiddler web proxy, see http://www.fiddler2.com/fiddler2/