Last active
March 4, 2018 17:53
-
-
Save lucasecf/12636027d7cdd923d1c2bcdddb69755c 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
struct GetMoviesTask { | |
let dispatcher: Dispatcher | |
func load(success: ([Movie]) -> Void, failure: (Error) -> Void) { | |
let request = URLRequest(url: URL(string: “www.mydomain.com/movies")!) | |
dispatcher.execute(request: request, success: { data in | |
// (…) | |
}, failure: { error in | |
// (…) | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment