AFCSVResponseSerializer is a serializer for AFNetworking that parses CSV-responses using CHCSVParser. The parsing part is mostly taken from AFCSVRequestOperation which does not fit the new architecture of AFNetworking.
AFCSVResponseSerializer is available through CocoaPods, to install it simply add the following line to your Podfile:
pod 'AFCSVResponseSerializer', '~> 0.0.1'
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.responseSerializer = [AFCSVResponseSerializer serializer];
[manager GET:@"http://url-to/file.csv" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"CSV Data as array: %@", responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];
AFCSVResponseSerializer is available under the MIT license. See the LICENSE file for more information.