user940016
user940016

Reputation: 2948

How can I access the request body of a POST request from Flex?

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?

Upvotes: 0

Views: 223

Answers (3)

user940016
user940016

Reputation: 2948

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...

Upvotes: 0

Imran
Imran

Reputation: 3024

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

Upvotes: 0

JeffryHouser
JeffryHouser

Reputation: 39408

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.

Upvotes: 1

Related Questions