Rails Metal POST parameters

Hi,

I’m having trouble when using Rack::Request in Rails Metal. For some
reason #params isn’t getting filled.

I’m calling the Metal action using:

curl -d “foo=bar” http://domain.local/metaltest

And the Metal action contains the following code in (some code omitted
for brevity):

def self.call(env)

request = Rack::Request.new(env)
request.params # This is empty for some reason

end

If I output request.body.read for debugging I see “foo=bar” but for
some reason request.params isn’t getting filled with these parameters
and is just an empty hash.

Anyone have any ideas?

Thanks

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