如何从NSURLSession.sharedSession().dataTaskWithReques
class PostFOrData { let url = NSURL( string: "http://210.61.209.194:8088/SmarttvWebServiceTopmsoApi/GetReadlist") var picUrl = NSURL(string : "http://210.61.209.194:8088/SmarttvMedia/img/epi00001.png") var responseString : NSString = "" func forData() -> NSString { let request = NSMutableURLRequest( URL: url!) request.HTTPMethod = "POST" var s : NSString = "" let postString : String = "uid=59" request.HTTPBody = postString.dataUsingEncoding(NSUTF8StringEncoding) let task = NSURLSession.sharedSession().dataTaskWithRequest(request) { data, response, error in if error != nil { println("error=\(error)") return } else { println("response = \(response!)") self.responseString = NSString(data: data, encoding: NSUTF8StringEncoding)! println("responseString = \(self.responseString)") } } // I want to return NSString here, but I always get nothing return self.responseString }}