Last active
November 2, 2016 10:05
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// raw | |
Alamofire.request(.GET, "http://api.room2shop.com/api/product/GetProducts?categoryId=22&filter=2&pageNumber=1") | |
.responseJSON { response in | |
debugPrint(response) | |
switch response.result { | |
case .Success(let JSON): | |
print(JSON) | |
case .Failure(let error): | |
print(error) | |
} | |
} | |
// with params | |
Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) | |
.responseData { response in | |
print(response.request) | |
print(response.response) | |
print(response.result) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment