Skip Menu |

This queue is for tickets about the Catalyst-Action-REST CPAN distribution.

Report information
The Basics
Id: 69062
Status: resolved
Priority: 0/
Queue: Catalyst-Action-REST

People
Owner: Nobody in particular
Requestors: quinn [...] fairpath.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.90
Fixed in: (no value)



Subject: Docs say params come in via $c->req->data. Actually, they come in via $c->req->params.
The subject line pretty much says it all. Whether by GET or by POST, $c->req->data is always undef, and $c->req->params always contains the request parameters. I can provide sample code to reproduce the problem, plus a patch, but first I want to make sure someone is actually monitoring this queue. Please respond. Thanks!
From: rjk [...] tamias.net
I think you are misunderstanding the documentation. The HTTP POST, PUT, and OPTIONS methods will all automatically deserialize the contents of $c->request->body into the $c->request->data hashref, based on the request's Content-type header. $c->req->data contains the deserialized *body* of the request. Request parameters are, and should be, in $c->req->params.
On Mon Aug 01 14:27:28 2011, rjk-cpan@tamias.net wrote: Show quoted text
> I think you are misunderstanding the documentation. > > The HTTP POST, PUT, and OPTIONS methods will all automatically > deserialize the contents of $c->request->body into the > $c->request->data hashref, based on the request's Content-type > header. > > $c->req->data contains the deserialized *body* of the request. Request > parameters are, and should be, in $c->req->params.
You're right: I was misunderstanding the documentation. Thanks for clarifying. Given what you said, the module works as expected.