I have the following:
@request.env['RAW_POST_DATA'] = data
@request.env['CONTENT_TYPE'] = 'application/xml'
@request.env['HTTP_CONTENT_TYPE'] = 'application/xml'
post "create", :api_key => api_key, :format => "xml"
and test.log shows this:
Processing ****Controller#create to xml (for 0.0.0.0 at 2011-07-08 15:40:20) [POST]
Parameters: {"format"=>"xml", "action"=>"create", "api_key"=>"the_hatter_wants_to_have_tea1", "controller"=>"****"}
Which... I guess is fine, but the RAW_POST_DATA doesn't show up as a hash in the parameters list in the log.... now... it works when I call the action from the terminal using curl:
curl -H 'Content-Type: application/xml' -d '<object><name>Das Object</name></object>' http://notAvailableDuringTesting.butWorksInDevelopmentMode.dev/object.xml?api_key=the_hatter_wants_to_have_tea1
what am I doing wrong here?