Last active
October 17, 2016 16:35
-
-
Save s4cha/046fe0cf812eefe6763fb79bc4232b84 to your computer and use it in GitHub Desktop.
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 ws | |
| import then | |
| let api = Api() | |
| struct Api { | |
| private let ws = WS("http://jsonplaceholder.typicode.com") | |
| func getUsers() -> Promise<[User]> { // We want [User] back! | |
| return ws.get("/users") | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment