2016-07-01 93 views

回答

0

上找到Alamofire的own GitHub readme

let parameters = [ 
    "foo": [1,2,3], 
    "bar": [ 
     "baz": "qux" 
    ] 
] 

Alamofire.request(.POST, "https://httpbin.org/post", parameters: parameters, encoding: .JSON) 
// HTTP body: {"foo": [1, 2, 3], "bar": {"baz": "qux"}} 

所以我想你會寫數據發送如下:

let dataToSend = ["uid":"777"] // or more brackets if you want an Array of Dictionaries