Flex : difference between using HTTPService and URLRequest

送分小仙女□ 提交于 2019-12-13 05:39:38

问题


What is the difference between using HTTPService and URLRequest for requesting your data from a flex page to servlet


回答1:


URLRequest is the Request Object that contains the URL to load, the post parameters, etc. Usually it is used with more basic loader types than HTTPService, like URLLoader.

HTTPService takes the URL directly as one of its properties, so it doesn't need a URLRequest. Technically, you could use a URLRequest to provide the rest of the "payload," since it is an Object and the request parameter of HTTPService can be any Object.




回答2:


HTTPService is a higher level object, part of the Flex framework, not native to the Flash Player.

It implements various interfaces and can be used as an MXML tag, so you can bind UI controls directly to it. If you are working mostly in MXML, this is easier to use.

URLLoader is native to the Flash Player and is more low level.



来源:https://stackoverflow.com/questions/12984806/flex-difference-between-using-httpservice-and-urlrequest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!