我有一个 XML 文件,我想将它发送到 rails 服务器。为此,我使用以下代码:
<mx:HTTPService id="dataService"
result="resultHandler(event)"
resultFormat="e4x"/>
在保存按钮触发的功能中,我执行以下操作:
var params:Object = {};
params["xml_file"] = xmlDoc;
dataService.method = "POST";
dataService.url = "http://localhost:3000/containers";
dataService.send(params);
不幸的是,总会出现问题(见下文)。如果我删除 params var,它会运行一个 GET 请求...
[RPC 故障 faultString="HTTP 请求错误" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream-Fehler . 网址:http://localhost:3000/containers "]。网址:http://localhost:3000/containers "]
可能是什么问题呢?
感谢您的任何提示!马库斯