How to parse request parameters from a post request.

35 views
Skip to first unread message

A Khan

unread,
Nov 13, 2014, 3:37:50 PM11/13/14
to nod...@googlegroups.com
Hi, 

I am new to Node js.  I am trying to parse the request parameters from a post request.  Basically, I have a simple HTML form. I submit the form and in my Node.js server I want to access the form fields values.  
I see lots of example for parsing query parameters but, that's not what I am looking for.  

Thanks and regards,
Ak

Aria Stewart

unread,
Nov 13, 2014, 4:55:20 PM11/13/14
to nod...@googlegroups.com
They've been conflated in a lot of other environments, but node developers tend to keep them separate. the only thing they have in common is that browsers send both as query-string formatted fields.

If you're using Express, the body-parser middleware is for this: it sets req.body, after reading the req stream.

Aria

Reply all
Reply to author
Forward
0 new messages