Reputation: 1054
I am looking for a simple way to send a POST request on a web service and receive a response as well using VBScript. So far, I have found a way to send a GET request using the code below:
Set http = CreateObject("Microsoft.XmlHttp")
http.open "GET", "http://www.webservicex.net/stockquote.asmx?WSDL", FALSE
http.send ""
WScript.Echo http.responseText
Please note that I chose VBScript because I am planning to create scheduled task using Task Scheduler
on server. If there are any other ways to do this, please let me know.
Thanks in advance.
Upvotes: 1
Views: 6275
Reputation: 22280
You can use "POST"
instead of "GET"
. That will create a HTTP Post request.
If you want to send anything as post data, you can do it with http.send
http.send "Name=John+Doe&Age=40&foo=bar&foobar=foobaz"
http.send "<?xml version="1.0"?><soap:Envelope ...... </soap:Envelope>"
Upvotes: 1