Skip to content

Instantly share code, notes, and snippets.

@mgrebenets
Created March 10, 2018 11:04
Show Gist options
  • Save mgrebenets/c3930a814d7ea58e2e26fbde8ebac469 to your computer and use it in GitHub Desktop.
Save mgrebenets/c3930a814d7ea58e2e26fbde8ebac469 to your computer and use it in GitHub Desktop.
Async Swift Scripting - 10
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