Standalone flash player navigateToURL using POST fails

136 views Asked by At

Since Flash plugin has reached EOL, the only way to still use my RIA is to use the standalone version of Flash player.

I've noticed an issue with the following piece of code while testing the migration:

var request:URLRequest = new URLRequest("/utils/function");
request.contentType = "application/x-www-form-urlencoded";
request.method = URLRequestMethod.POST;

var data:URLVariables = new URLVariables();
data.x = encodeURIComponent(1);
data.y = encodeURIComponent(2);
data.z = encodeURIComponent('some value');
request.data = data;

navigateToURL(request, "_blank");

The standalone version of flash (v30.0.0.134) makes a GET request instead of the instructed POST method. The browser plugin (v32.0.0.238) opens the page correctly in a new tab as a POST request.

Why does the standalone flash convert my request in to a GET? Anybody out there who can shed some light on this issue?

1

There are 1 answers

0
Mitz On

I don't know if it qualifies as a answer, but we use this to make a POST request:

        handleService.url='.../something.ashx';
        handleService.method = URLRequestMethod.POST;
        
        var prm:Object=new Object();
        prm.par1 = "asd";
        prm.content=encodedData;
        prm.fileName=FileName;
        handleService.send(prm);

Instead of going for a standalone version of flash, you can package the app as a Adobe AIR runtime. We still use some apps written in Flex and have no issues with them.

If running on windows, you can package it as a native runtime and works nice.