为什么我为第二个让我变得零的任何想法?
if let url = NSURL (string: "https://domain.com/api/v2/oauth2/authorize?response_type=code&client_id=" + urlSuffix)
{
do
{
var file: String = " "
try file = String(contentsOfURL: url, encoding: NSUTF8StringEncoding) as String
print("Contents of page: \n" + file) //this works correctly and displays the contents, which is another URL)
let uri = NSURL (string:file)
print (uri) // this fails and returns nil