Created
January 30, 2018 18:42
-
-
Save nathanborror/0a336c511fde088d5b9a0c21a9731aa8 to your computer and use it in GitHub Desktop.
Simulate Slow Connection
This file contains 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
let task = URLSession.shared.dataTask(with: req) { (data, response, error) in | |
... | |
} | |
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(4)) { | |
task.resume() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment