What is the intension behind not adding req.query for in the case
of method is post? I get it that if i use bodyparser its part of the
req.body but what makes it different from get.
--
regards,
Prashanth
twitter: munichlinux
irc: munichlinux, JSLint, munichpython.
--
You received this message because you are subscribed to the Google Groups "Express" group.
To post to this group, send email to expre...@googlegroups.com.
To unsubscribe from this group, send email to express-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/express-js?hl=en.
On Sat, Jan 28, 2012 at 10:25 PM, vision media [ Tj Holowaychuk ]
<t...@vision-media.ca> wrote:
> it should work for any method, this is the query() middleware (used by
> express internally):
It dint.
>
> module.exports = function query(){
> return function query(req, res, next){
> req.query = ~req.url.indexOf('?')
> ? qs.parse(parse(req.url).query)
> : {};
> next();
> };
> };
>
> so if there's a query-string you should have it
I dont think post parameters are part of query string.
Post parameters will only be on the query string if your form method is get. Otherwise it's in the body