1 Replies - 1293 Views - Last Post: 29 November 2011 - 03:22 PM Rate Topic: -----

#1 bob12321  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 19-July 11

How to get redirected url as string after request

Posted 29 November 2011 - 01:49 PM

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!

Is This A Good Question/Topic? 0
  • +

Replies To: How to get redirected url as string after request

#2 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,505
  • Joined: 16-March 11

Re: How to get redirected url as string after request

Posted 29 November 2011 - 03:22 PM

Httpwebresponse class.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1