Lefora Free Forum
login join
Loading
451 views

Newbie trying to capture the URL of a 307 redirect

Page 1
1–1
rookie - member
1 posts

I'm a complete newbie at Cocoa but having a go anyway :)

I'm reading a URL and extracting the data which I then parse, however the info that I need is now contained within the URL of the redirected page - not in the page itself.

So for example I originally read http://www.mydomain.com and in the content of that page as a parameter called Fred=66

Now, http://www.mydomain.com redirects to http://www.mydomain.com/?fred=66

The code is currently

NSString* reply = [[NSString alloc] initWithData: data encoding: NSASCIIStringEncoding];

NSArray* parts = [reply componentsSeparatedByString:@": "];

NSEnumerator* e = [parts objectEnumerator];

NSString* s;


But how can I change this to read the URL of the new redirected page?


Any hints or advice appreciated!

Page 1
1–1

Locked Topic


You must be a member to post in this forum

Join Now!