Sunday, March 29, 2009

H is for HTTPService

Flex's HTTPService is used to make HTTP requests and handle the results. When you call the HTTPService object's send() method, it makes an HTTP request to the specified URL, and an HTTP response is returned (asynchrnously).

The HTTPService is part of Flex's Remoting/RPC library.

Making an HTTP request in ActionScript:

  1. Create an instance of mx.rpc.http.HttpService
  2. Set the HTTP url
  3. Set the result format
  4. Send a request
  5. Handle the result or fault
    1. via pre-registered event listeners
    2. or via responders
Learn more about the Flex HTTPService at Flex After Dark...