首页 > 其他 > 详细

Alamofire数据请求

时间:2016-08-17 15:20:28      阅读:137      评论:0      收藏:0      [点我收藏+]
        let stringurl = "http://www.huiyunche.cn/kyleuat/banner/list"
        Alamofire.request(.GET,stringurl,parameters:nil)
            .responseJSON { response in
                if let JSON = response.result.value {
                    var dic1 = NSMutableDictionary()
                    dic1 = (JSON as? NSMutableDictionary)!
                    print("postJSON: \(dic1["data"]![0])")
                }
        }
        let stringurl = "http://www.huiyunche.cn/kyleuat/order/republish"
        let para=["orderid": "74","reason":"reason"];
        Alamofire.request(.POST,stringurl,parameters:para,headers:headers)
            .responseJSON { response in
                //print(response.request)  // original URL request
                //print(response.response) // URL response
                //print(response.data)     // server data
                //print(response.result)   // result of response serialization
                
                if let JSON = response.result.value {
                    print("postJSON: \(JSON)")
                }
        }

 

Alamofire数据请求

原文:http://www.cnblogs.com/sayimba/p/5779962.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!