0
parameters = ["name":name, "description":description, "location":location, "start_time":start_time , "end_time":end_time/* ..etc */] as [String: AnyObject]
Alamofire.request(.PUT, url, parameters: parameters, encoding: .json, headers: ["Authorization": auth_token, AppVersionKey: AppVersionValue]).validate().responseJSON() { response in
print("Status code of default pic call: \(response.response?.statusCode)")
}
前にうまく働いた前のスウィフト/ Alamofireバージョンから古いコードを持っている私は私が今持っている知っています
Alamofire.request(url, method: .put, ... , encoding: JSONEncoding.default ...)
にそれを切り替えることしかし、私はparameters
のためのXcodeのエラーを取得していますし、修正が-それだけのkの各値にas AnyObject
を追加され、その後、「発現をもたらすVペアがあるには余りにも複雑でした合理的な時間に解決... "エラー。新しいSwift3とAlamofire4でこれをどうやってやるのですか?これはスウィフトエラーまたはAlamofire移行問題
[Alamofireパラメータの可能な複製は\ [String:Anyobject \]ですか?](http://stackoverflow.com/questions/31733630/alamofire-parameter-only-accepts-string-anyobject) – dirtydanee