Flex:在主体中发送带有二进制数据的HTTP POST请求 [英] Flex: Send HTTP POST request with binary data in body
本文介绍了Flex:在主体中发送带有二进制数据的HTTP POST请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是Flex的新手,还不知道如何将二进制数据作为POST请求的主体发送到服务器。 HTTPService组件似乎不支持这一点。 FileReference似乎不支持通过Flex API设置数据。
I'm new to Flex and couldn't figure out yet how to send binary data to the server as the body of a POST request. The HTTPService component doesn't seem to support this. The FileReference doesn't seem to support setting the data via the Flex API.
不幸的是,对于stackoverflow.com上的类似问题的答案并不是很有希望。任何新的指针将不胜感激,非常感谢!
Unfortunately the answers to similar questions on stackoverflow.com haven't been very promising. Any new pointers would be greatly appreciated, thanks a lot!
- Andreas
-- Andreas
推荐答案
使用 URLLoader
和 URLRequest
类发布它。
var urlLoader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest(url);
request.data = binaryData;
request.method = URLRequestMethod.POST
urlLoader.load(request);
这篇关于Flex:在主体中发送带有二进制数据的HTTP POST请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文