Created
May 31, 2016 08:37
-
-
Save InstaRobot/fa7edfedc0906ee90f72730740a6b53d to your computer and use it in GitHub Desktop.
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
func makeUrl(url: String) -> String { | |
var contents: String = "" | |
if let urlApi = NSURL(string: "https://clck.ru/--?url=\(url)") { | |
do { | |
contents = try String(contentsOfURL: urlApi, usedEncoding: nil) | |
print(contents) | |
} catch { | |
} | |
} else { | |
print("Cannot make url request") | |
} | |
return contents | |
} // makeUrl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment