diff options
author | Matthew Sotoudeh <matthewsot@outlook.com> | 2014-06-12 00:16:52 -0700 |
---|---|---|
committer | Matthew Sotoudeh <matthewsot@outlook.com> | 2014-06-12 00:16:52 -0700 |
commit | fac28c60b6ca6e413b25da2c443b3be78559cf97 (patch) | |
tree | 910c9225f11bad5bf6b92d1dea893f21afdcc84a | |
parent | 8156d5fcc255d856ca9e7952aa901ea0fd423c57 (diff) |
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 Binary files differindex 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 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 |