--
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.
--
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.
L.
>>>>> +unsub...@googlegroups.com.
>>>>> For more options, visit this group athttp://groups.google.com/
>>>>> group/express-js?hl=en.
>>
>>> --
>>> 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
>>> +unsub...@googlegroups.com.
>>> For more options, visit this group athttp://groups.google.com/
>>> group/express-js?hl=en.
>
> --
> 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
> For more options, visit this group at http://groups.google.com/
> group/express-js?hl=en.
>
--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/
Routes match the request path, not the query parameters; to get at the query parameters (the name=value pairs following ?), use req.param() (see here: http://expressjs.com/guide.html#req.param%28%29).
L.
app.post('/pin/save/:lat(\\d+.\\d+)/:long(\\d+.\\d+)', function(req, res){
res.send(req.params.lat + ' ' + req.params.long);
});
app.post('/pin/save2/:lat([0-9]+.[0-9]+)/:long([0-9]+.[0-9]+)', function(req, res){
res.send(req.params.lat + ' ' + req.params.long);
});
both will work, as well as some other alternatives, and of course a regular expression. it's a bit confusing with the escapes, and "." is always literal in the routes so express adds \. for you. i need more docs for this haha
--
TJ Holowaychuk
On Friday, May 20, 2011 at 3:41 PM, Tronic wrote:
app.post('/pin/save/:latitude(\\d+\.\d+)/:longitude(\\d+\.\d+)',
function(req, res) {
--
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 athttp://groups.google.com/group/express-js?hl=en.
--
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 athttp://groups.google.com/group/express-js?hl=en.
--
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.
--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/
--
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.
To unsubscribe from this group, send email to express-js+...@googlegroups.com.