user1471159
user1471159

Reputation:

Flex : difference between using HTTPService and URLRequest

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

Upvotes: 1

Views: 968

Answers (2)

Peter Hall
Peter Hall

Reputation: 58695

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.

Upvotes: 0

Amy Blankenship
Amy Blankenship

Reputation: 6961

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.

Upvotes: 2

Related Questions