问题描述
如果我想通过HTTP POST以下格式的身体动作发:
If I want to send the following format body in actionscript through http Post:
Content-Type: multipart/related; boundary="END_OF_PART"
Content-Length: 423478347
MIME-version: 1.0
Media multipart posting
--END_OF_PART
Content-Type: application/atom+xml
<entry xmlns='http://www.w3.org/2005/Atom'>
<title>plz-to-love-realcat.jpg</title>
<summary>Real cat wants attention too.</summary>
<category scheme="http://schemas.google.com/g/2005#kind"
term="http://schemas.google.com/photos/2007#photo"/>
</entry>
--END_OF_PART
Content-Type: image/jpeg
...binary image data...
--END_OF_PART--
我如何写发送多部分/相关内容类型的动作。
请指教。谢谢你。
How can I write the actionscript to send the "multipart/related" content type.
Please advice. Thanks.
推荐答案
这可能有助于在使用类似的AS3 HttpClient库一件事 - 他们的helper方法对各种请求/响应头操纵的纯AS3不会做。你可以在这里找到它: HTTP://$c$c.google.com/p/ as3httpclientlib /
One thing that might help is using something like the AS3 HTTPClient library - they have helper methods for all sorts of request/response header manipulation that plain AS3 won't do. You can find it here: http://code.google.com/p/as3httpclientlib/
做超出简单的HTTP东西GET / POST总是在Flash中的痛苦,和多POST是特别棘手。如果HttpClient的没有做什么,你需要让我知道,我多了一个工具我以前做了过去。我可以挖掘,多达你,如果你需要它,只是让我知道!
Doing anything beyond simple HTTP get/post is always a pain in Flash, and multipart POST is particularly tricky. If that httpclient doesn't do what you need let me know and I have one more utility I used to do this in the past. I can dig that up for you if you need it, just let me know!
希望帮助,MYK
这篇关于如何发送一个&QUOT;多部分/相关&QUOT;在Actionscript中的内容类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!