Skip to content

Instantly share code, notes, and snippets.

@predictioniogists
Created March 18, 2015 05:00
Show Gist options
  • Save predictioniogists/fbb59d355b23835b9bc1 to your computer and use it in GitHub Desktop.
Save predictioniogists/fbb59d355b23835b9bc1 to your computer and use it in GitHub Desktop.
Querying in Swift
let engineClient = EngineClient(baseURL: "http://localhost:8000")
let query = [
"user": "16398de4-cd17-11e4-afdc-1681e6b88ec1",
"num": 5
]
engineClient.sendQuery(query) { (request, response, JSON, error) in
if let data = JSON as? [String: [[String: AnyObject]]] {
...
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment