controller request.body?

I am trying to get the body of the request coming in to the
controller. request.body is a StringIO object. I cannot seem to see
what is actually inside it. any ideas?

StringIO#string

StringIO#request.body says StringIO in the log file.

See request.methods to find what you want. Or just use debugger.

def index

debugger

end

$ rdebug script/server

when it stops first time after run

c[Enter]

then go to your action with browser, and the server will stop on the ‘debugger’ method position. Then you just run

irb[Enter]

and

request[Enter]

You’ll see the request object.

I can do request.inspect and see what comes in, but the text is not there it seems to be embedded somewhere.

StringIO#string is a reference to the stringmethod of StringIO, this
is normal Ruby notation for talking about an instance method.

so

request.body.string