‎01-20-2020 06:37 PM
Const WebURL = "http://10.1.1.68:81/api.aspx"
Const URL2 = "http://shastawsus.corporate.local:81/api.aspx"
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim webREQ As WebRequest, webRES As HttpWebResponse
Dim key As String = HttpUtility.UrlEncode("810f482c-a6d2-44c0-8f65-cc513ab7a0d9")
Dim sWebURL As String = ("?Action=GetTicket&Key=" & key & "&TicketID=22315")
Dim compURL As String = URL2 & sWebURL
webREQ = WebRequest.Create(compURL)
'webREQ.Headers.Add("Accept", "application/json")
webREQ.Credentials = New NetworkCredential("waibelr", "LetM3In!")
Try
webRES = webREQ.GetResponse
Catch wEX As WebException
TextBox2.Text = wEX.Message
Exit Sub
Catch ex As Exception
TextBox2.Text = ex.Message
Exit Sub
End Try
TextBox1.Text = webRES.StatusCode
TextBox2.Text = webRES.StatusDescription
End Sub
‎01-27-2020 03:01 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now