私はすべての Http Request に AFNetworking ライブラリを使用しています。私のサンプルリクエストは次のようになります
AFJSONRequestOperation *operation = [[AFJSONRequestOperation alloc] initWithRequest:requestObj];
[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
[dic setValue:operation forKey:@"operationObj"];
[dic setValue:responseObject forKey:@"jsonData"];
[requestedView performSelector:callBackFunction withObject:[NSNumber numberWithBool:YES] withObject:dic];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error resopnse => %@",error);
[dic setValue:operation forKey:@"operationObj"];
[dic setValue:error forKey:@"error"];
[requestedView performSelector:callBackFunction withObject:[NSNumber numberWithBool:YES] withObject:dic];
}];
初めて Http リクエストを行うと、オペレーションキューの開始に時間がかかり、レスポンス ステータス コードが 0 になることがあります。
しかし、同じリクエストを再度トリガーしようとすると、問題は発生しませんでした。
私は何かを逃していますか?
前もって感謝します