как я могу получить строку ответа из блока сбоев в AFNetworking 3.x,
В версии 2.x способ сделать это был:
[manager GET:path parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSDictionary *dictionary_FetchResult = responseObject;
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSDictionary *dictionary_FetchResult = operation.responseObject;
}];
но в версии 3.x в параметре возвращаемого блока нет операции, как показано ниже:
[manager POST:path parameters:parameters progress:^(NSProgress * _Nonnull uploadProgress) {
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSDictionary *dictionary_FetchResult = responseObject;
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
NSLog(@"Error: %@", error);
}];
поэтому я надеялся, что кто-то сможет это достичь.