HTTPService Request in Flex for Mobile

Took a while to figure out the error being returned by the phone when trying to post data from the phone to a form.

>> Error #2032: Stream Error.

Reading up on this error, it could happen for a number of reasons. The most common of which being along the lines of “This error appears to occur when the url or file is blocked or not found by HTTPService call.

Although for me, if you are correctly connected to the page you want to make a request to, the key was to inspect the response it was receiving from the server. It wasn’t really a flex error, but rather an issue of what the PHP hosted form was returning. When submitting a post form normally, it doesn’t matter what the response text is. Although, if it’s being called by a mobile device, it should be returning an XML or json response based on the status of the request being made.