Imports System.Net
Imports System.IO
Imports WinHttp

Module Module1

    Sub Main()
        Dim url = "http://www.agendize.com/api/1.0/action?media=sms&key=3ac024abf8c72460764b965199f81808f4cb08&id=424581&phone=+33611111111"
        ' Assemble an HTTP request.
        Dim WinHttpReq = New WinHttpRequest
		WinHttpReq.Open("GET", url, False)
        ' Set the user name and password.
        WinHttpReq.SetCredentials("myusername","mypassword", 0)
        ' Send the HTTP Request.
        WinHttpReq.Send()
        ' Return the response.
        Dim xmlContent = WinHttpReq.ResponseText
        ' Analyzes the xml content and return the response code
        Dim domDoc As Xml.XmlDocument
        domDoc = New Xml.XmlDocument
        domDoc.LoadXml(xmlContent)
        Console.WriteLine(domDoc.GetElementsByTagName("result").Item(0).InnerText)
    End Sub

End Module
