Skip to content

Instantly share code, notes, and snippets.

@InstaRobot
Created May 31, 2016 08:37
Show Gist options
  • Save InstaRobot/fa7edfedc0906ee90f72730740a6b53d to your computer and use it in GitHub Desktop.
Save InstaRobot/fa7edfedc0906ee90f72730740a6b53d to your computer and use it in GitHub Desktop.
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