Special characters like DOTS in Express.js route?

I got the following node.js / express.js method:

app.post('/pin/save/:latitude/:longitude', function(req, res) {
...
}

values ​​that assign latitude and longitude include points, for example. 16.33245 / 46.28473. the problem is that express.js tells me that it cannot get this url. deleting points that it works ... any advice how can I express to take points on a route?

thank

+3
source share
1 answer

Have you given a route determined to be received in addition to the one that was sent? I tried this and it worked fine:

app.get('/test/:lat/:long', function(req, res){
  res.send("lat:" + req.params.lat + " long:" + req.params.long);
});

with:

/test/1.2/3.4

gave me:

lat:1.2 long:3.4
+5
source

All Articles