summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sotoudeh <matthewsot@outlook.com>2014-06-12 00:16:52 -0700
committerMatthew Sotoudeh <matthewsot@outlook.com>2014-06-12 00:16:52 -0700
commitfac28c60b6ca6e413b25da2c443b3be78559cf97 (patch)
tree910c9225f11bad5bf6b92d1dea893f21afdcc84a
parent8156d5fcc255d856ca9e7952aa901ea0fd423c57 (diff)
sendasynchronousrequestHEADmaster
-rw-r--r--Universals/WebClient/Swift/WebClient/WebClient.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/UserInterfaceState.xcuserstatebin9479 -> 9996 bytes
-rw-r--r--Universals/WebClient/Swift/WebClient/WebClient/WebClient.swift11
2 files changed, 11 insertions, 0 deletions
diff --git a/Universals/WebClient/Swift/WebClient/WebClient.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/UserInterfaceState.xcuserstate b/Universals/WebClient/Swift/WebClient/WebClient.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/UserInterfaceState.xcuserstate
index b2c8404..4007b8e 100644
--- a/Universals/WebClient/Swift/WebClient/WebClient.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/UserInterfaceState.xcuserstate
+++ b/Universals/WebClient/Swift/WebClient/WebClient.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
diff --git a/Universals/WebClient/Swift/WebClient/WebClient/WebClient.swift b/Universals/WebClient/Swift/WebClient/WebClient/WebClient.swift
index f8caeb6..eb6b0db 100644
--- a/Universals/WebClient/Swift/WebClient/WebClient/WebClient.swift
+++ b/Universals/WebClient/Swift/WebClient/WebClient/WebClient.swift
@@ -9,6 +9,11 @@
import Foundation
import Cocoa
+enum Something: NSUInteger {
+ case Somethin = 1;
+ case Another = 2;
+}
+
struct WebClient {
func GetAsyncString(url: String, handler: (String) -> Void) {
//Thanks! http://stackoverflow.com/questions/24016142/how-to-make-an-http-request-in-swift
@@ -19,5 +24,11 @@ struct WebClient {
var str: String = NSString(data: data, encoding: NSUTF8StringEncoding);
handler(str);
})
+ NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue(), completionHandler: {(response, data, error) in
+
+ var str: String = NSString(data: data, encoding: NSUTF8StringEncoding);
+ handler(str);
+ });
+ var something: String, something_else: String = "hello";
}
} \ No newline at end of file
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback