Search code examples
actionscript-1

How can you create an HTTP POST request in ActionScript 1?


I have a text field that I'd like to support an arbitrary amount of text in. Right now the text is sent through an XML object request using GET. I'd like to use POST to send the data back to the server. Are there any good options in ActionScript 1?


Solution

  • You want to use the LoadVars object and assign values to keys you create as you go so:

    obj.id=myId; obj.status = myStatusId;

    obj.sendAndLoad(url, responseVarThatYouSetupToHandleOnLoadEvent, "POST");