Two+ hours wasted today on dealing with this. Apparently when using URLVariables to pass variables to the server using HTTP Post, using the square bracket syntax ( vars[varname] = varvalue ) sets the contentType of the URLRequest to text/html. However setting the same variables using the dot syntax (vars.varname = varvalue) sets it to text/xml. I couldn’t set the contentType to text/xml using the  notation no matter how I tried, whether using the URLRequest.contentType property or appending a custom “Content-Type”,”text/xml” URLRequestHeader.
Hope this helps someone.
5 thoughts on “AS3 weirdness with URLVariables for HTTP POST”
Interesting. If you use the constructor to initialize the URLVariables instance like so: new URLVariables(“name=John Doe”)…internally the URLVariables instance uses the bracket notation to set its dynamic properties within ‘decode’ method, but after unescaping them. Do you still see craziness going that route?
Try calling ‘toString’ on your URLVariables instances to see what the resulting URL encoded params will look like, curious to see if there is a difference in your case between  and ‘.’.
Thanks Corey. I’ll try that and see what comes up.
Interesting blog. Ran across it while researching something for Flex and thought I would drop a note. Hope all is going well at Comcast.