Làm thế nào tôi có thể gọi mã tùy chỉnh khi chuyển hướng xảy ra trong lúc gửi một yêu cầu với phương pháp:Theo dõi chuyển hướng khi sử dụng sendAsynchronousRequest: queue: completionHandler :?
+ (void)sendAsynchronousRequest:(NSURLRequest *)request queue:(NSOperationQueue *)queue completionHandler:(void (^)(NSURLResponse*, NSData*, NSError*))handler
?
tôi đang tìm cách để tái tạo hành vi phương pháp NSURLConnectionDelegate:
- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse