- Home
·
- Internet/HTML
·
- This snippet downloads data from a URI and prints it to the console.
This snippet downloads data from a URI and prints it to the console.
This snippet downloads data from a URI and prints it to the console.
Rate This snippet downloads data from a URI and prints it to the console.
(2(2 Vote))
Imports System.Net
Imports System.Text
public class WebReq
Shared Sub Main()
Dim uri As New Uri("http://www.cy2online.net")
Dim request As WebRequest = WebRequest.Create(uri)
Dim response As WebResponse = request.GetResponse()
Dim stream As Stream = response.GetResponseStream()
Dim reader As New StreamReader(stream)
Dim data As String = reader.ReadToEnd()
reader.Close()
stream.Close()
Console.WriteLine(data)
End Sub
This snippet downloads data from a URI and prints it to the console. Comments
No comments yet — be the first to post one!
Post a Comment