Accessing params when data posted as yaml

like everyone else, I’m trying to develop a RESTful API. and for
whatever reason, I like the idea of posting data using yaml. my script
to post the data looks like this:
parameters = { “token” => @token } #.merge(parameters)
response ="/backups/new", parameters.to_yaml, {
“X-POST_DATA_FORMAT” => “yaml” } )

and the controller code that handles the request is basically this:
class MyController < ApplicationController
def new
token = params[:token]
render_text token

but token is not available in params. do I have to enable something to
get the yaml processing in the controller. I thought I understood that
this would be done automatically with the X-POST_DATA_FORMAT header. I
have also send the yaml content type to no avail.

what am I missing?


the log in the server console is this:
Processing BackupsController#new (for at 2006-10-28 01:06:16)
Session ID: 49b1e7c9d2c7542f3eb310fa38a0ab41
Parameters: {“action”=>“new”, “controller”=>“backups”, “— \ntoken:
Completed in 0.00010 (10000 reqs/sec) | 200 OK

and I am running with edge rails, revision 5370.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs