Skip to content

danurna/AFCSVResponseSerializer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AFCSVResponseSerializer

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.

Installation

AFCSVResponseSerializer is available through CocoaPods, to install it simply add the following line to your Podfile:

 pod 'AFCSVResponseSerializer', '~> 0.0.1'

Example Usage

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);
}];

License

AFCSVResponseSerializer is available under the MIT license. See the LICENSE file for more information.