mirror of
https://bitbucket.org/vendoo/vendoo_v1.0.git
synced 2025-12-25 11:47:40 +00:00
48 lines
1.3 KiB
Markdown
48 lines
1.3 KiB
Markdown
#AlamofireSwiftyJSON
|
|
[](https://travis-ci.org/starboychina/AlamofireSwiftyJSON)
|
|
[](https://github.com/Carthage/Carthage)
|
|
[](https://github.com/starboychina/AlamofireSwiftyJSON/releases)
|
|
[](https://github.com/realm/SwiftLint)
|
|
|
|
---
|
|
Easy way to use both [Alamofire](https://github.com/Alamofire/Alamofire) and [SwiftyJSON](https://github.com/SwiftyJSON/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
|
|
|
|
[Carthage](https://github.com/Carthage/Carthage)
|
|
|
|
```ogdl
|
|
github "starboychina/AlamofireSwiftyJSON"
|
|
```
|
|
|
|
## Usage
|
|
|
|
```swift
|
|
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)")
|
|
}
|
|
|
|
```
|