1. 程式人生 > >swift簡單解析

swift簡單解析

 Alamofire.request("http://live.ximalaya.com/live-web/v4/homepage?device=iPhone", method: .get, parameters: nil, encoding: URLEncoding.default, headers: nil).responseJSON{(resprionse)in
            
            if(resprionse.error == nil){
                
                print("請求成功")
               resprionse.result.value
                print(resprionse)
            }else{
                print("請求失敗")
                
            }
            
        }