这是我的代码:
SRWebClient.POST("http://www.tiikoni.com/tis/upload/upload.php").data(messageData, fieldName:"photo", data: ["CreatedBy":"4","Name": "Test", "Description" :"Test","CategoryId": "0", "SendToSupplier":"0","DeliveryDate":"25/10/2016","FileExtension":"png"])
.send({(response:AnyObject!, status:Int) -> Void in
// process success response
},failure:{(error:NSError!) -> Void in
// process failure response
})
这个方法给我错误
无法使用类型为.....的参数列表调用
答案 0 :(得分:0)
SRWebClient.POST("YOUR URL/M/API").data(YorARRAYOFIMAGEDATA,
fieldName:"photo",
data: [
"CreatedBy":"4",
"Name": "Test",
"Description" :"Test",
"CategoryId": "0",
"Parameters":"0",
"DeliveryDate":"25/10/2016",
"FileExtension":"png"
])
.send({(response:AnyObject!, status:Int) -> Void in
print("Success")
self.navigationController?.popFadeToRootViewController()
}, failure: {(error:NSError!) -> Void in
print("failure")
}
)