mirror of
https://bitbucket.org/vendoo/vendoo_v1.0.git
synced 2025-12-25 03:37:39 +00:00
1.3 KiB
1.3 KiB
Easy way to use both Alamofire and SwiftyJSON
Requirements
- iOS 8.0+ / Mac OS X 10.9+
- Xcode 7.0
Install
- CocoaPods
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target "target name" do
pod 'AlamofireSwiftyJSON'
end
- Carthage
github "starboychina/AlamofireSwiftyJSON"
Usage
let URL = "http://httpbin.org/get"
Alamofire.request(.GET, URL, 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)")
}