HTTP GET in VBS

Justin Bennett picture Justin Bennett · Oct 15, 2008 · Viewed 155k times · Source

Is there a way to perform an HTTP GET request within a Visual Basic script? I need to get the contents of the response from a particular URL for processing.

Answer

svinto picture svinto · Oct 15, 2008
Dim o
Set o = CreateObject("MSXML2.XMLHTTP")
o.open "GET", "http://www.example.com", False
o.send
' o.responseText now holds the response as a string.