1
林试图在Adobe Flex的一个简单的HTTP URLReqest,继承人的代码大致为:HTTP的URLRequest在Adobe的Flex
var requestSender:URLLoader = new URLLoader();
var urlRequest :URLRequest = new URLRequest("http://localhost:8888");
var msg:String = "data=blah";
urlRequest.data = msg;
urlRequest.contentType = "application/x-www-form-urlencoded";
urlRequest.method = URLRequestMethod.POST;
这就产生了接近:
POST/HTTP/1.1
Referer: app:/PersonSearch.swf
Accept: text/xml, application/xml, application/xhtml+xml, ...
x-flash-version: 10,1,85,3
Content-Type: application/x-www-form-urlencoded
Content-Length: 102
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows; U; en-US) ...
Host: 127.0.0.1:8888
Connection: Keep-Alive
data=blah
我真正想要的是:
POST/HTTP/1.1
Content-Type:application/x-www-form-urlencoded
Connection:close
Via:MDS_777
Accept:*/ *
Host:localhost:8888
Content-Length:104
data=blah
任何人都知道我如何删除字段,如接受编码,添加字段如“Via”并设置连接到“关闭”?
另外我们如何从HTTP请求获取响应?
感谢 菲尔
你试图解决我这样做的问题是什么? – 2011-03-28 16:18:47