Use NSURLSession.
This commit is contained in:
1 parent
6e391ccbff
commit
edefa3350e
3 files changed
+30
-36
No files matched your search
@@ -27,7 +27,7 @@
|
||||
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.chapterdb.org/chapters/search?title=%@", [SBMetadataHelper urlEncoded:title]]];
|
||||
|
||||
NSDictionary *headerOptions = @{@"ApiKey" : API_KEY};
|
||||
self.task = [SBMetadataHelper sessionTaskFromUrl:url withHTTPMethod:@"GET" headerOptions:headerOptions completionHandler:^(NSData * _Nullable data) {
|
||||
self.task = [SBMetadataHelper sessionTaskFromUrl:url HTTPMethod:@"GET" headerOptions:headerOptions cachePolicy:NSURLRequestUseProtocolCachePolicy completionHandler:^(NSData * _Nullable data) {
|
||||
NSXMLDocument *xml = [[NSXMLDocument alloc] initWithData:data
|
||||
options:0
|
||||
error:NULL];
|
||||
|
||||
Reference in new issue
Block a user