request: T, retryCounter: Int = 0, completion: @escaping (Result<T.ResponseType>) -> Void) { Alamofire.request(request.URL, method: request.method, parameters: request.parameters, headers: request.headers).responseData { response in switch response.result { case .success(let value): guard let responseData = request.responseFromObject(value) else { return completion(Result.failure(/* fail to parse error */)) } return completion(Result.success(responseData)) case .failure(let error): if request.retryCount > retryCounter && request.canRetry(error: error) { return self.performRetryableRequest(request, retryCounter: retryCounter + 1, completion: completion) } return completion(Result.failure(error)) } } } ... ,BCV[J;B5FDITXJGU ؙٔؒأزٔزٓ؎ׅ