瀏覽代碼

[PR #1612] Fixed compilation issue in response handler section of the README.

Vishrut Shah 9 年之前
父節點
當前提交
5e8b3eb22b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      README.md

+ 1 - 1
README.md

@@ -242,7 +242,7 @@ Alamofire.request("https://httpbin.org/get").response { response in
     print("Response: \(response.response)")
     print("Error: \(response.data)")
 
-    if let data = data, let utf8Text = String(data: data, encoding: .utf8) {
+    if let data = response.data, let utf8Text = String(data: data, encoding: .utf8) {
     	print("Data: \(utf8Text)")
     }
 }