flex support for REST methods
does the latest sdk now support RESTful methods like PUT and DELETE using their HTTPService?开发者_如何学JAVA
thanks
According to the HTTPService documentation it does.
OK it seems like you need to use a separate server like BlazeDS in order to gain access to the PUT and DELETE methods. I haven't tried this personally, I feel like it is totally lame that this has to be the only solution. When I was using FLEX 3 with Rails 2, I was able to achieve RESTfulness by doing the ?_method=PUT hack. But, when I upgraded to Rails 3, it isn't working anymore :(
I been doing some readin trying to straighten this out. I also posted on here (Rails 3 is "_method=PUT" still supposed to work?) but I havent gotten any responses yet.... I really hope I don't need to trash FLEX because of Rails 3 not supporting the _method=PUT hack.
PUT and DELETE methods can be supported in the latest SDK (eg. Apache Flex 4.12.0) by using the 'X_HTTP_METHOD_OVERRIDE' request header attribute.
Reference: http://blog.arulprasad.com/2010/12/http-put-delete-from-actionscript-rest.html
Note, the request header must be in CAPITALs, not mixed case as in the article.
精彩评论