# How to read raw post data?

**URL:** <https://www.ruby-forum.com/t/how-to-read-raw-post-data/131246>\
**Category:** Rails\
**Created:** [March 7, 2008, 9:32am UTC](https://www.ruby-forum.com/t/how-to-read-raw-post-data/131246 "2008-03-07T09:32:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ipipip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/f0a364/32.png) [@ipipip](https://www.ruby-forum.com/u/ipipip)\
**Post date:** [March 7, 2008, 9:32am UTC](https://www.ruby-forum.com/t/how-to-read-raw-post-data/131246/1 "2008-03-07T09:32:13Z")

</div>

Hi all,

I’m trying to get SWFupload to work in Rails 2. Since flash does not  
send cookies (containing session\_id) to rails, my session id is sent  
as a post parameter. I tried to override CGI::Session’s initialize  
method and grab the session id from the post parameter, but  
cgiwrapper.env\_table[‘RAW\_POST\_DATA’] always returns nil. Is there  
another way to get the raw post data inside CGI::Session’s initialize  
method?

Thanks!
