0

For example on any tinyurl/ajdeijad link (this one is fake), the link redirects to another url

I cant grab the whole response because it is 200 MB- what can I do to JUST GET THE URL

Here is my code:

Dim request1 As HttpWebRequest = DirectCast(HttpWebRequest.Create(urlvimeohd), HttpWebRequest)
            request1.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1"
            request1.MaximumAutomaticRedirections = 1
            request1.AllowAutoRedirect = True

How do you retrieve the url of the response (it redirects!)

Thanks!

2
Contributors
1
Reply
4
Views
5 Years
Discussion Span
Last Post by Oxiegen
1

Have you tried using HttpWebResponse.ResponseUri?

Dim response As HttpWebResponse
Dim resUri As String

response = request.GetResponse
resUri = response.ResponseUri.AbsoluteUri
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.