iOS 解析短链接
let urlString = "" // 短链接地址let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()/*Tip:为了安全,最好设置下 User-Agentlet xHTTPAdditionalHeaders: [NSObject: AnyObject] = ["User-Agent": UserAgent.userAgentString]configuration.HTTPAdditionalHeaders = xHTTPAdditionalHeaders*/let session = NSURLSession(configuration: configuration)let task = session.dataTaskWithRequest(NSURLRequest(URL: scanString.urlValue!), completionHandler: { (data, response, error) inprint("短链接解析 error :\(error)")dis...阅读全文