Browse Source

Updated to Swift 2.0 Changes

Just stumbled upon this when I was using Alamofire with one of my Swift 2.0 projects, and thought I'd do a quick fork.
Benedikt Terhechte 10 năm trước cách đây
mục cha
commit
7d0b8c9dc7
1 tập tin đã thay đổi với 5 bổ sung4 xóa
  1. 5 4
      Alamofire.playground/section-1.swift

+ 5 - 4
Alamofire.playground/section-1.swift

@@ -5,9 +5,10 @@ import Alamofire
 // Allow network requests to complete
 XCPSetExecutionShouldContinueIndefinitely()
 
-Alamofire.request(.GET, "http://httpbin.org/get", parameters: ["foo": "bar"])
+Alamofire.request(.GET, URLString: "http://httpbin.org/get", parameters: ["foo": "bar"])
          .responseString { (request, response, string, error) in
-            println(request)
-            println(response)
-            println(string)
+            print(request)
+            print(response)
+            print(string)
          }
+