Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift 2 Json Alamofire错误";。。需要1个参数,但指定了3个";iOS 9 Xcode 7_Json_Xcode_Ios9_Alamofire - Fatal编程技术网

Swift 2 Json Alamofire错误";。。需要1个参数,但指定了3个";iOS 9 Xcode 7

Swift 2 Json Alamofire错误";。。需要1个参数,但指定了3个";iOS 9 Xcode 7,json,xcode,ios9,alamofire,Json,Xcode,Ios9,Alamofire,我尝试在我的应用程序中实现JSON解析,以查看我网站上的最新Wordpress帖子 现在我有以下错误: 闭包参数列表的上下文类型需要1个参数,但指定了3个 “问题代码” 希望你能帮助我 向你致意!我收到了 func getPosts(getposts : String) { Alamofire.request(.GET, getposts, parameters:parameters) .responseJSON { response in gu

我尝试在我的应用程序中实现JSON解析,以查看我网站上的最新Wordpress帖子

现在我有以下错误:

闭包参数列表的上下文类型需要1个参数,但指定了3个

“问题代码”

希望你能帮助我

向你致意!

我收到了

func getPosts(getposts : String)
{
    Alamofire.request(.GET, getposts, parameters:parameters)
        .responseJSON { response in

            guard let data = response.result.value else{
                print("Request failed with error")
                return
            }

            self.json = JSON(data)
            self.tableView.reloadData()

    }
}

简单的代码,它将基本URL和参数作为服务和方法类型

 Alamofire.request(.POST, "http://www.abc.cpm", parameters: ["consumer_key": "fnfkdkdndf"]).responseJSON { response in

           print(response)

        }

我昨天下载了这个,我想它的版本是3.请看可能的副本
 Alamofire.request(.POST, "http://www.abc.cpm", parameters: ["consumer_key": "fnfkdkdndf"]).responseJSON { response in

           print(response)

        }