Easy way to use both Alamofire and SwiftyJSON
- iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
- Xcode 8.1+
- Swift 3.0+
- CocoaPods
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target "target name" do
pod 'AlamofireSwiftyJSON'
end
github "starboychina/AlamofireSwiftyJSON"
let URL = "http://httpbin.org/get"
Alamofire.request(URL, method: .get, parameters: ["foo": "bar"]).responseSwiftyJSON { response in
print("###Success: \(response.result.isSuccess)")
//now response.result.value is SwiftyJSON.JSON type
print("###Value: \(response.result.value?["args"].array)")
}