I need to write vbscript to send HTTP request to remote server for a machine owned by an organization. Initially, I tried with MSXML2.ServerXMLHTTP
but looks like there is some proxy blocking requests made using the script.
I can send requests using Internet Explorer just fine, so IE has proxy settings configured.
My script looks like this now:
Set xHttp = CreateObject("Microsoft.XMLHTTP")
'Set http = CreateObject("MSXML2.XMLHTTP")
xHttp.Open "POST", SERVER_URL, data, False
xHttp.Send
Is there any way to get proxy settings from IE and use it in vbscript somehow? I can't find any reference on internet about particular issue.
There is a possible workaround, you can try to use IE intrinsic XHR:
UPDATE
There are some useful articles:
Using Fiddler with WinHTTP
WinINet vs. WinHTTP
I guess there might be another possible way to use IE proxy settings without IE itself. Need further insight
Use the latest version of ServerXMLHTTP object
I hope this is the exact answer to your question. Instead of using the complicated approach of
InternetExplorer.Applciation