Highlighted

make HTTPService url 'dynamic'?

GuinnessIsGoodn

03-09-2008

What's the best way to pass a parameter to the HTTPService in
the URL? For example, a SessionID or other standard http/url
params.



This would be run-time determined, of course, and couldn't be
hard-coded in the mxml or action-script (though the root of the URL
could).



Thanks in advance,

AJ

Replies

Highlighted

Avatar

Guest

09-09-2008

Basically



<httpService etc.>

<request>

<param>

{paramvar}

</param>



</request>

</httpService>





'paramvar'



Would be a variable that would be set at runtime.

GuinnessIsGoodn

09-09-2008

Yes (I'm going to mark that as the answer).



The key to me was setting that var as bindable and using the
HTTPUtil class to retrieve the value from the parameters on the
html (owner) page's url. Then the creationComplete() function
actually does some work
before doing the HTTPService.send().



Thanks for taking the time to reply. I've posted a few things
(that I don't see totally out of the ordinary), and it seems to be
a bit of a "cold" forum at times. 😞