AIR ANDROID アプリの actionscript から GCM への HTTP リクエストを作成しようとしています。私は何を間違っていますか?こちらのリクエスト形式に従っています。
エラー 400 が返ってきます
var url:String = "https://android.googleapis.com/gcm/send";
var request:URLRequest = new URLRequest(url);
var rhArray:Array = new Array(new URLRequestHeader("Content-Type", "application/json"),new URLRequestHeader("Authorization", "key=MYAPIKEY"));
request.requestHeaders = rhArray;
var msgData:String = JSON.stringify({"message":"holy crap message worked","title":"the message title here"});
var postData:String = JSON.stringify({"registration_ids":["THELONGREGISTRATIONIDOFTHEDEVICEIWANTTOMESSAGE"],"data":msgData});
request.data = postData;
request.method = URLRequestMethod.POST;
var urlLoader:URLLoader = new URLLoader();
urlLoader = new URLLoader();
urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler, false, 0, true);
urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler, false, 0, true);
urlLoader.load(request);