I am using the Winhttp.lib
library to send an HTTP request in C++ to a remote server.
On the client side, the HTTP request has to be sent to a proxy which IP is W.X.Y.Z
and which port is 1234
.
According to the prototype of the function WinHttpOpen()
(https://msdn.microsoft.com/en-us/library/windows/desktop/aa384098%28v=vs.85%29.aspx),
in particular the parameters dwAccessType
, pwszProxyName
and pwszProxyBypass
, it looks like this is the function which has to be told about the proxy.
How do I tell the WinHttpOpen()
function that the proxy to send the HTTP request to is (IP = W.X.Y.Z, PORT = 1234)
?
The structure WINHTTP_PROXY_INFO
(https://msdn.microsoft.com/en-us/library/windows/desktop/aa383912%28v=vs.85%29.aspx) looks interesting but I do know how to use it in combination with WinHttpOpen()
.
Thank you.