I am having trouble getting my flex app to send a POST request to my Rails app. It seems to always send GET.
This is my service declaration:
<mx:HTTPService id="add_email_service" showBusyCursor="true" result="parseJoinResult();" fault="onJoinFault(event)" useProxy="false" />
In my application init function, I set the method to POST:
add_email_service.url = join_url;
add_email_service.method = "POST";
However, my Rails app still sees the request as a post request when I send it. I know this because if I require the request to be POST in my routes.rb file:
# RESTful API for joining a mailing list
map.connect 'mailing_lists/join/:id',
:controller => 'mailing_lists',
:action => 'join',
:conditions => { :method => :post}
the request faults and I can see in my dev log :
"Processing ApplicationController#index (for 127.0.0.1 at 2009-04-23 14:25:35) [GET], ActionController::MethodNotAllowed (Only post requests are allowed.):"
Does anyone know why this is happening?