by Syed (1 Submission)
Category: Internet/HTML
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Sun 7th December 2008
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
This snippet downloads data from a URI and prints it to the console.
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
No comments have been posted about This snippet downloads data from a URI and prints it to the console.. Why not be the first to post a comment about This snippet downloads data from a URI and prints it to the console..