Mongrel Users: How does the HttpHandler process() method deal with data passed via POST? The HttpRequest object captures all GET params appended to an URL, but I just tried to retrieve data passed via POST and it came up nil. that is, I assumed the HttpRequest object contained the param named in the html form and its value.But the POST passed params are not found in the request object. Please advise. Cheers, geoffrey bays
In an HTTP POST, the data params are sent as part of the request body. This means you need to read the request body and parse that into whatever form you need. request.body.read should get you the raw unparsed POST data. -Todd On 11/10/07, Geoffrey Bays <charioteer7 at gmail.com> wrote:> > Mongrel Users: How does the HttpHandler process() method deal with > data passed via POST? > The HttpRequest object captures all GET params appended to an URL, but > I just tried to > retrieve data passed via POST and it came up nil. > that is, I assumed the HttpRequest object contained the > param named in the html form and its value.But the POST passed params > are not found in the > request object. > > Please advise. > > Cheers, > > geoffrey bays > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > rubyforge.org/mailman/listinfo/mongrel-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: rubyforge.org/pipermail/mongrel-users/attachments/20071111/635a1989/attachment.html