Skip to content

Instantly share code, notes, and snippets.

@ebot
Last active August 29, 2015 14:06
Show Gist options
  • Save ebot/359dca331247f164a790 to your computer and use it in GitHub Desktop.
Save ebot/359dca331247f164a790 to your computer and use it in GitHub Desktop.
Sample cscript jscript for posting xml to a web site with basic authentication
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
xmlhttp.open("POST","http://server/path/here/page_her.aspx", false, "user_name_here", "secret_pass_here");
xmlhttp.send("<Root><Node><Param Id=\"0EBFAE2E-40EE-11E0-A8BC-0019B9B66271\"/></Node></Root>");
WScript.Echo(xmlhttp.responseXML.xml);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment