Skip navigation
Currently Being Moderated

capture full httpservice url?

Apr 30, 2013 12:53 PM

is there a simple way to capture the full url (parameters included) when a httpservice is sent?  I'd like to put the url in a variable for later use.

  • Currently Being Moderated
    May 9, 2013 1:10 PM   in reply to madhooper

    You could look at the url and body properties on the corresponding HTTPRequestMessage and reconstruct the URL (assuming method="GET"). You can get this message from either the asynchronous completion token returned from calling httpService.send(), or via an InvokeEvent's message property by registering an invoke="invokeHandler(event)" listener on <mx:HTTPService>.


    If you're not using a server side gateway / proxy, the client-side mx.messaging.channels.DirectHTTPChannel is the class that manages the HTTP request. It sets up the query parameters to append to the url in its mx_internal::createURLRequest() method around line 234:


                var urlVariables:URLVariables = new URLVariables();

                var body:Object = httpMsg.body;

                for (var p:String in body)

                    urlVariables[p] = httpMsg.body[p];


                params = urlVariables.toString();

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points