POST params

3 views
Skip to first unread message

tjholowaychuk

unread,
Jul 8, 2009, 4:23:08 PM7/8/09
to nodejs
request.uri.params is empty when using POST, GET is fine though; Is
there a property to get the raw request body for parsing?

Hagen

unread,
Jul 8, 2009, 5:07:42 PM7/8/09
to nod...@googlegroups.com
request.uri.params is everything behind the ? in the URI.

What you are looking for is parsing the request body, very different beast.

You will have to register callbacks "body" and "complete" for that. A callback to "body" will give a chunk of the request body (imagine streaming if you think this is overkill). Once "complete" is called, you are sure to have received the complete request body.

tjholowaychuk

unread,
Jul 8, 2009, 5:13:52 PM7/8/09
to nodejs
Ah I see, just wanted to see if there were plans to parse it when its
urlencoded but I will check out what your suggesting

Hagen

unread,
Jul 8, 2009, 5:17:52 PM7/8/09
to nod...@googlegroups.com
Ah I see, just wanted to see if there were plans to parse it when its
urlencoded but I will check out what your suggesting

http://github.com/ujh/coltrane/tree/master is probably worth a look

tjholowaychuk

unread,
Jul 8, 2009, 6:10:52 PM7/8/09
to nodejs
No worries only took a minute to fix, I just didnt see that part of
the documentation right

Marcin Raczkowski

unread,
Jul 8, 2009, 4:24:00 PM7/8/09
to nod...@googlegroups.com
post parameters are pased in request body, so you need to just read it.

tjholowaychuk

unread,
Jul 9, 2009, 2:19:37 PM7/9/09
to nodejs
I know that :P I just didnt see the docs on how to grab the body from
node

ry

unread,
Jul 20, 2009, 3:58:47 PM7/20/09
to nodejs
On Jul 8, 9:13 pm, tjholowaychuk <tjholoway...@gmail.com> wrote:
> Ah I see, just wanted to see if there were plans to parse it when its
> urlencoded but I will check out what your suggesting

No. I don't plan to add that feature.
Reply all
Reply to author
Forward
0 new messages