I'm using some pretty standard URL code in Cocoa - basically
result = [NSURLConnection sendSynchronousRequest:query
returningResponse:&response
error:&serverError];
However I cannot see how to detect when the query (which is the URL) responds with a redirect - I want to be able to process the data differently if the result is not the HTML code that I expect due to a redirect - in which case I want to capture and parse the redirected URL
Can anyone help me with this?