Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
Merge pull request #94 from hkellaway/hotfix/afnetworking_deprecation
Browse files Browse the repository at this point in the history
Hotfix: Replaced deprecated AFNetworking call
  • Loading branch information
Harlan Kellaway committed Mar 10, 2016
2 parents 9b35047 + c1862df commit 01375ba
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions Pod/Classes/HNKGooglePlacesServer.m
Expand Up @@ -55,18 +55,15 @@ + (void)GET:(NSString *)path parameters:(NSDictionary *)parameters completion:(v
{
NSString *urlString = [kHNKGooglePlacesServerBaseURL stringByAppendingPathComponent:path];

[httpSessionManager GET:urlString
parameters:parameters
success:^(NSURLSessionDataTask *task, id responseObject) {
if (completion) {
completion(responseObject, nil);
}
}
failure:^(NSURLSessionDataTask *task, NSError *error) {
if (completion) {
completion(nil, error);
}
}];
[httpSessionManager GET:urlString parameters:parameters progress:^(NSProgress *downloadProgress) { } success:^(NSURLSessionDataTask *task, id responseObject) {
if (completion) {
completion(responseObject, nil);
}
} failure:^(NSURLSessionDataTask *task, NSError *error) {
if (completion) {
completion(nil, error);
}
}];
}

@end

0 comments on commit 01375ba

Please sign in to comment.