diff --git a/Swifter/Dictionary+Swifter.swift b/Swifter/Dictionary+Swifter.swift index 34fba119..119e8cfd 100644 --- a/Swifter/Dictionary+Swifter.swift +++ b/Swifter/Dictionary+Swifter.swift @@ -62,9 +62,9 @@ extension Dictionary { } func stringifiedDictionary() -> Dictionary { - let dict = self.reduce([String: String]()) { (var dict, tuple) in - dict["\(tuple.0)"] = "\(tuple.1)" - return dict + var dict = [String: String]() + for (key, value) in self { + dict[String(key)] = String(value) } return dict } diff --git a/Swifter/SwifterOAuthClient.swift b/Swifter/SwifterOAuthClient.swift index e7107c1e..42b6a214 100644 --- a/Swifter/SwifterOAuthClient.swift +++ b/Swifter/SwifterOAuthClient.swift @@ -70,9 +70,9 @@ internal class SwifterOAuthClient: SwifterClientProtocol { return request } - func post(path: String, baseURL: NSURL, var parameters: Dictionary, uploadProgress: SwifterHTTPRequest.UploadProgressHandler?, downloadProgress: SwifterHTTPRequest.DownloadProgressHandler?, success: SwifterHTTPRequest.SuccessHandler?, failure: SwifterHTTPRequest.FailureHandler?) -> SwifterHTTPRequest { + func post(path: String, baseURL: NSURL, parameters: Dictionary, uploadProgress: SwifterHTTPRequest.UploadProgressHandler?, downloadProgress: SwifterHTTPRequest.DownloadProgressHandler?, success: SwifterHTTPRequest.SuccessHandler?, failure: SwifterHTTPRequest.FailureHandler?) -> SwifterHTTPRequest { let url = NSURL(string: path, relativeToURL: baseURL)! - + var parameters = parameters var postData: NSData? var postDataKey: String?