码迷,mamicode.com
首页 > 其他好文 > 详细

Alamofire数据请求

时间:2016-08-17 15:22:00      阅读:143      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!