Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 AS3 POST请求作为GET发送_Actionscript 3_Http - Fatal编程技术网

Actionscript 3 AS3 POST请求作为GET发送

Actionscript 3 AS3 POST请求作为GET发送,actionscript-3,http,Actionscript 3,Http,当尝试向ASP.NET asmx web服务发送POST请求时,我看到(在Charles和Firebug中),它作为GET完成 这是我的AS3 public function save(page:SharedPageVO, callback :Function = null): void { var req:URLRequest = new URLRequest( "service.asmx/CreateSharedPage" ); req.data = page; req.m

当尝试向ASP.NET asmx web服务发送POST请求时,我看到(在Charles和Firebug中),它作为GET完成

这是我的AS3

public function save(page:SharedPageVO, callback :Function = null): void {
   var req:URLRequest = new URLRequest( "service.asmx/CreateSharedPage" );
   req.data = page;
   req.method = URLRequestMethod.POST;
   if (callback != null)
   {
    //handle removing the event here instead of there
    this.complete = callback;
    DataService.instance.addEventListener(Event.COMPLETE, onComplete);
   }
   DataService.instance.load( req );
}

public var complete:Function;
private function onComplete(e:Event)
{
 if (complete != null) complete(e);
 complete = null;
 DataService.instance.removeEventListener(onComplete);
}
这似乎是flash的一个问题,因为它甚至在进入服务器之前就已经发生了。我已经把它上传到了一个测试服务器上,我仍然认为它可以通过测试。任何帮助都将不胜感激。谢谢。

来自actionscript LR(URLRequest类,方法属性):

注意:如果在Flash Player中运行并且引用的表单没有正文,Flash Player将自动使用GET操作,即使该方法设置为URLRequestMethod.POST。因此,建议始终包括一个“虚拟”主体,以确保使用正确的方法

您使用的是actionscript LR(URLRequest类,方法属性)中的“虚拟”主体吗?

注意:如果在Flash Player中运行并且引用的表单没有正文,Flash Player将自动使用GET操作,即使该方法设置为URLRequestMethod.POST。因此,建议始终包括一个“虚拟”主体,以确保使用正确的方法


你在用那个“假”身体吗?

你的表格肯定有身体,对吗?文档中写道:“注意:如果在Flash Player中运行并且引用的表单没有正文,Flash Player会自动使用GET操作,即使该方法设置为URLRequestMethod.POST。”谢谢Stephen,就是这样。您的表单肯定有正文,对吗?文档中写道:“注意:如果在Flash Player中运行并且引用的表单没有正文,Flash Player会自动使用GET操作,即使方法设置为URLRequestMethod.POST。”感谢Stephen,正是这样。