Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Although POST may be having multiple values for the same key, I'd be cautious using it, since some servers can't even properly handle that, which is probably why this isn't supported ... if you convert "duplicate" parameters to a list, the whole thing might start to choke, if a parameter comes in only once, and suddendly you wind up having a string or something ... but i guess you know what you're doing ...</p> <p>I am sorry to say so, but what you want to do, is not possible in pure AS2 ... the only 2 classes available for HTTP are <code>LoadVars</code> and <code>XML</code> ... technically there's also <code>loadVariables</code>, but it will simply copy properties from the passed object into the request, which doesn't change your problem, since properties are unique ...</p> <p>if you want to stick to AS2, you need an intermediary tier:</p> <ol> <li>a server to forward your calls. if you have access to the server, then you create a new endpoint for AS2 clients, which will decode the requests and pass them to the normal endpoint.</li> <li>use javascript. with <code>flash.external::ExternalInterface</code> you can call JavaScript code. You need to define a callback for when the operation is done, as well as a JavaScript function that you can call (there are other ways but this should suffice). Build the request string inside flash, pump it to JavaScript and let JavaScript send it to the server in a POST request and get the response back to flash through the callback.</li> </ol> <p>up to you to decide which one is more work ...</p> <p><em>side note:</em> in AS3, you'd use <code>flash.net::URLLoader</code> with <code>dataFormat</code> set to <code>flash.net::URLLoaderDataFormat.TEXT</code>, and then again encode parameters to a string, and send them.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload