WebRequest.Headers Property gets or sets the collection of header name/value pairs associated with the request. : Web Request « Network Remote « VB.Net
WebRequest.Headers Property gets or sets the collection of header name/value pairs associated with the request.
Imports System.IO
Imports System.Net
Imports System.Text
publicclass MainClass
Shared Sub Main()
Dim myWebRequest As WebRequest = WebRequest.Create("http://www.domain.com")
Dim myWebResponse As WebResponse = myWebRequest.GetResponse()
myWebResponse.Close()
Console.WriteLine(ControlChars.Cr + "The HttpHeaders are " + ControlChars.Cr + "{0}", myWebRequest.Headers)
End Sub
End Class