From aa28b669558e9b90ba3cd5fe8a7cfe1508396b53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=84=B1=EC=A4=80?= Date: Fri, 22 Feb 2019 00:59:13 +0900 Subject: [PATCH] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9cee97f..56ed65d 100644 --- a/README.md +++ b/README.md @@ -76,9 +76,9 @@ final class BoosterManager { static func fetchLiquidOxygen( type: String, quantity: Int, - completion: @escaping (Result - ) -> Void ) { - BoosterCenter().request(.fetchLiquidOxygen( + completion: @escaping (Result) -> Void + ) -> URLSessionDataTask { + return BoosterCenter().request(.fetchLiquidOxygen( type: type, quantity: quantity )) { (data, error) in @@ -99,7 +99,7 @@ final class BoosterManager { Finally, you can access an API like this: ```swift -BoosterManager.fetchLiquidOxygen(type: type, quantity: quantity) { result in +let dataTask = BoosterManager.fetchLiquidOxygen(type: type, quantity: quantity) { result in switch result { case .success(let resultData): // do something with response data