Created
November 6, 2016 17:35
-
-
Save kaishin/816b7af3f55842a54349b0f1aa74dfe4 to your computer and use it in GitHub Desktop.
ATS Sample
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
<key>NSAppTransportSecurity</key> | |
<dict> | |
<key>NSExceptionDomains</key> | |
<dict> | |
<key>redalemeden.com</key> | |
<dict> | |
<key>NSIncludesSubdomains</key> | |
<true/> | |
<key>NSTKemporaryExceptionAllowsInsecureHTTPLoads</key> | |
<true/> | |
</dict> | |
</dict> | |
</dict> |
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
guard let url = URL(string: "http://redalemeden.com") else { return } | |
URLSession.shared.dataTask(with: url) { data, response, error in | |
guard let data = data, let html = String(data: data, encoding: .utf8) else { return } | |
print(html) | |
}.resume() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment