0

I have an HTML page and it needs to send a POST request for another HTML page that's embedding a Flex application. How can I access the request body from that request in Flex?

4

3 回答 3

1

Even though you say that you are POSTING a request from one HTML page to another; that is not actual what happens. The POST rewuest is sent to a server. That server may then process the request somehow and spit out a new HTML page. But, you cannot POST from one HTML page to another.

Since Flex is a client side technology, you cannot use a POST Request to pass data into it. You also wouldn't be able to access the POST request from Javascript as a parallel.

So, you can have your server process the data, and prepare it to send back to your Flex app. You could do this using FlashVars. If you have a greater data set, then you could somehow save the data to the server, and load it into the Flex app using HTTPService, RemoteObject, or WebService.

于 2012-10-03T12:10:50.650 回答
0

you can use FlashVar and External Interface to pass data from parent page to embeded Flex app Please take a look on Communicating with the wrapper

Hopes that Helps

于 2012-10-03T12:11:11.587 回答
0

In the end I used a GET request and attached the data to the URL. I know it's ugly, but couldn't find any other way...

于 2012-11-02T15:03:18.147 回答