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 = @conn.post("/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
end
end

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?

thanks!

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

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