Dim request As HttpRequest Dim response As HttpResponse = Nothing Dim reader As StreamReader Dim data As StringBuilder Dim byteData() As Byte Dim postStream As Stream = Nothing Dim Address As Uri Try Address = New Uri(URL) request = DirectCast(WebRequest.Create(Address.ToString), HttpRequest) Catch ex As Exception End Try
I'm getting an error stating that webrequest can't be cast to an httprequest. This particular line come directly from sample code from Yahoo. I'm relatively new to .net (obviously) and don't want to go down the wrong road (use the wrong object). Since I may need to deal with cookies, do I need to use something like the old iNet control from COM? Hopefully, there is a .net solution.