Dim webRequest As HttpWebRequest = DirectCast(Net.WebRequest.Create("URL of Raas service"), HttpWebRequest)
webRequest.Method = "GET"
webRequest.ContentType = "application/x-www-form-urlencoded"
webRequest.Credentials = New NetworkCredential("URL of RaaS service", "token")
Dim httpResponse As HttpWebResponse
Dim contentReader As StreamReader
Try
httpResponse = DirectCast(webRequest.GetResponse(), HttpWebResponse)
contentReader = New StreamReader(httpResponse.GetResponseStream())
Dim readToEnd As String = contentReader.ReadToEnd()
Catch ex As Exception
'' Log the exception here
End Try
webRequest.Method = "GET"
webRequest.ContentType = "application/x-www-form-urlencoded"
webRequest.Credentials = New NetworkCredential("URL of RaaS service", "token")
Dim httpResponse As HttpWebResponse
Dim contentReader As StreamReader
Try
httpResponse = DirectCast(webRequest.GetResponse(), HttpWebResponse)
contentReader = New StreamReader(httpResponse.GetResponseStream())
Dim readToEnd As String = contentReader.ReadToEnd()
Catch ex As Exception
'' Log the exception here
End Try
No comments:
Post a Comment