Created
March 10, 2018 11:04
-
-
Save mgrebenets/c3930a814d7ea58e2e26fbde8ebac469 to your computer and use it in GitHub Desktop.
Async Swift Scripting - 10
This file contains hidden or 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
import Alamofire | |
import SwiftScriptRunner | |
var runner = SwiftScriptRunner() | |
runner.lock() // Lock | |
Alamofire.request("http://httpbin.org/get") | |
.responseJSON { response in | |
print(response) // Result of response serialization | |
runner.unlock() // Unlock | |
} | |
runner.wait() // Wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment