Skip to content
This repository was archived by the owner on May 31, 2022. It is now read-only.

Latest commit

 

History

History
50 lines (36 loc) · 1.65 KB

File metadata and controls

50 lines (36 loc) · 1.65 KB

AlamofireSwiftyJSON

Build Status Swift version Carthage compatible SwiftLint codecov.io GitHub release


Easy way to use both Alamofire and SwiftyJSON

Requirements

  • iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 8.1+
  • Swift 3.0+

Install

  • CocoaPods
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target "target name" do
  pod 'AlamofireSwiftyJSON'
end
github "starboychina/AlamofireSwiftyJSON"

Usage

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)")
}