GoogleShortener API を使用して URL の短いバージョンを取得しようとしています。AFNetworking 3.0 を使用していますが、「AnyObject は 'NSProxy' のサブタイプではありません」というエラーが表示されます。
let manager = AFHTTPSessionManager()
manager.requestSerializer = AFJSONRequestSerializer()
let params = ["longUrl": "MYURL"]
manager.POST("https://www.googleapis.com/urlshortener/v1/url?key=MYKEY", parameters: params, success: {(operation: NSURLSession!,responseObject: AnyObject!) in
println("JSON" + responseObject.description)
},
failure: { (operation: NSURLSession!,error: NSError!) in
println("Error while requesting shortened: " + error.localizedDescription)
})
「説明」の開始時に「println("JSON" + responseObject.description)」行で強調表示されます。