Skip to content

Commit 6f151ae

Browse files
committed
Basic NSURLSession API.
1 parent 3857357 commit 6f151ae

28 files changed

+9188
-1109
lines changed

CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@
2323
#include <CoreFoundation/CFXMLInterface.h>
2424
#include <CoreFoundation/CFRegularExpression.h>
2525
#include <CoreFoundation/CFLogUtilities.h>
26+
#include <CoreFoundation/CFURLSessionInterface.h>
2627
#include <CoreFoundation/ForFoundationOnly.h>
2728
#include <fts.h>
2829

30+
2931
_CF_EXPORT_SCOPE_BEGIN
3032

3133
struct __CFSwiftObject {

CoreFoundation/URL.subproj/CFURLSessionInterface.c

Lines changed: 747 additions & 0 deletions
Large diffs are not rendered by default.

CoreFoundation/URL.subproj/CFURLSessionInterface.h

Lines changed: 748 additions & 0 deletions
Large diffs are not rendered by default.

Foundation.xcodeproj/project.pbxproj

Lines changed: 84 additions & 2 deletions
Large diffs are not rendered by default.

Foundation/NSData.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ extension NSData {
334334
let cond = NSCondition()
335335
var resError: NSError?
336336
var resData: NSData?
337-
let task = session.dataTaskWithURL(url, completionHandler: { (data: NSData?, response: NSURLResponse?, error: NSError?) -> Void in
337+
let task = session.dataTask(with: url, completionHandler: { (data: NSData?, response: NSURLResponse?, error: NSError?) -> Void in
338338
resData = data
339339
resError = error
340340
cond.broadcast()

0 commit comments

Comments
 (0)