Rails 3 is “_method=PUT” still supposed to work?

前端 未结 3 1809
耶瑟儿~
耶瑟儿~ 2020-12-12 01:32

I\'m using FLEX 3 to make XML request to Rails 3. Since FLEX 3 only offers POST and GET, I have to use the \"?_method=PUT\" hack to maintain proper RESTfulness:

<         


        
3条回答
  •  醉话见心
    2020-12-12 01:51

    You might have to rewrite how you're making your request to the server. I'm using Rails 3, Flex 4, and Flash 10 together (but with an app developed in Flex 3) and use _method as a parameter in my HTTPService object (leaving the content-type as the default application/x-www-form-url).

    HTTPService only supports GET and POST requests. If you use set useProxy property to true on the HTTPService object, you can use HEAD, OPTIONS, TRACE, and DELETE but only if you are also using a server-based proxy service. If this doesn't work, then you may want to try URLLoader or URLRequest or implementing your own custom solution instead.

提交回复
热议问题