First I wanted to call this post HTTPService is evil. And you will soon find out why.
I wanted to implement an Adobe AIR RESTful client and for this I needed to make remote service calls using PUT and DELETE HTTP methods. According to the ActionScript documentation (livedocs) it's possible for AIR apps to use these let's say eccentric methods. And being used to the HTTPService I tried using it to put data to a Java servlet backend. It was a big surprise to see that the request was being converted to a get and was handled by the doGet function in the backend.
So after a few hours of research and desperate trials I actually found out that this works just fine with URLRequest and URLLoader. Yep, that's right, back to the basics. I think this just shows that some parts of the Flex 3 SDK weren't done with quality in mind. I was often dissapointed by the way some of the classes were written.
So attached you'll find an AIR project file that tests 2 methods. HTTPService vs URLRequest and URLLoader. You'll notice how HTTPService converts anything other than POST to GET. You also have the JAVA servlet attached, but you can implement it in any other backend language.
The most important product for any product manager
11 months ago