我试图让使用Alamofire与参数用Python编写后端的GET请求。
我尝试没有成功这样做的几种方法,我在其他地方见过,我应该为了得到一个干净的GET请求删除参数和它的工作。
我仍然需要使用参数,使我看到了这个帖子:Get JSON result with GET request and parameters with Alamofire
试图在那里的解决方案时,Xcode让我瞬间错误:extra argument in call
这是怎么看起来像当我得到我的错误:
Alamofire.request(.GET, urlString, parameters: ["test":"te"]).responseJSON {
(responseObject) -> Void in
print(responseObject)
if responseObject.result.isSuccess {
let resJson = JSON(responseObject.result.value!)
success(resJson)
}
if responseObject.result.isFailure {
let error: NSError = responseObject.result.error!
failure(error)
}
}