我仿照swift3.0微博项目请求数据总是不成功,求指导啊
let urlString = "https://api.weibo.com/2/statuses/public_timeline.json"
let params = ["access_token" : "2.00p8NiXF0eqD_eebe9833c3etEeYDD"]
GCNetworking.share.get(urlString, parameters: params, progress: nil, success: { (_, json) in
print(json)
}) { (_, error) in
print(error)
}
Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLKey=https://api.weibo.com/2/statuses/public_timeline.json?access_token=2.00p8NiXF0eqD_eebe9833c3etEeYDD, NSLocalizedDescription=cancelled, NSErrorFailingURLStringKey=https://api.weibo.com/2/statuses/public_timeline.json?access_token=2.00p8NiXF0eqD_eebe9833c3etEeYDD}
这个错误要怎么解决啊
|
|