Thanks to David at support for very quickly helping me find the
following solution:
Heroku Stuff
-----------------
Heroku doesn't support X_HTTP_METHOD_OVERRIDE, but it does support X-
HTTP-METHOD-OVERRIDE. (Presumably this is the case with other headers
too.)
Flex Stuff
-------------
Flex's object notation, on the other hand, doesn't support dashes
(which is the reason that Flex/Rails architectures use underscores in
the first place). Therefore, you can't specify X-HTTP-METHOD-OVERRIDE
inline within your Flex MXML. Nor can you specify it via standard
property notation within Actionscript. You can do the following:
1) Specify the HTTPService in your MXML, data binding an object
variable (in this case putHeader) into the headers property:
<mx:HTTPService id="yourResourceUpdate" url="urlHere" method="POST"
resultFormat="e4x" contentType="application/xml"
result="callbackFunction(event)" headers="{putHeader}"/>
2) Define putHeader as a data bindable object within your CDATA tags:
[Bindable] private var putHeader:Object = new Object();
3) Write the header into the bindable object within a constructor
method, using good old-fashioned array access notation:
public function setup():void
{
putHeader["X-HTTP-METHOD-OVERRIDE"] = "put";
}
--
You received this message because you are subscribed to the Google Groups
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en.