WebRequest (System.Net)

This is an abstract base class which WebClient and HttpWebRequest are derived from.


To create a web request you should use the WebRequestFactory to return an instance of an object derived from WebRequest.


Dim objWebRequest As System.Net.WebRequest 
objWebRequest = New System.Net.WebRequest.Create("url")

With objWebRequest
   .TimeOut =
   .MaximumAutomaticRedirections = 200
   .Credentials = New System.Net.NetworkCredential("userid", "password")
   .Method = "GET"
   .ContentType = "text/xml"
End With

Dim objResponse As System.Net.WebResponse 
objResponse = objWebRequest.GetResponse()

Dim objStreamReader As System.IO.StreamReader 
objStreamReader = objWebRequest.GetResponseStream




© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited TopPrevNext