我正在尝试将数据发布到为我处理它的页面。但是,我总是收到以下错误:
ioErrorHandler: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost:8080/_user/a/ad/admin/message.create。 html "errorID=2032] 块引用
这是我到目前为止的代码。这适用于 GET 请求。
// Object that contains data of the message to be sent
var toSend:Object = {
"sakai:type": "internal",
"sakai:sendstate": "pending",
"sakai:messagebox": "outbox",
"sakai:to": "internal:"+sakaimain.gui.dgMessages.selectedItem["to"],
"sakai:subject": sakaimain.gui.dgMessages.selectedItem["subject"],
"sakai:body":"testreply with AIR GUI",
"sakai:previousmessage" : sakaimain.gui.dgMessages.selectedItem["id"]
};
// Send message
// Create loader to load objects
var loader:URLLoader = new URLLoader();
// Add event listeners for error and complete events
loader.addEventListener(Event.COMPLETE, replyMessageCompleteHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, replyMessageErrorHandler);
// Create the request to be done
var request:URLRequest = new URLRequest("http://localhost:8080/_user/a/ad/admin/message.create.html");
request.requestHeaders = new Array(new URLRequestHeader("x-sakai-token", sakaimain.token ));
request.method = URLRequestMethod.POST;
request.data = toSend;
// Do the request
loader.load(request);
有人在这里看到问题吗?