Saturday, 8 April 2017

query parameter not taken into account?

CODE:

app.get("/:searchterm", function(req,res) {
   var searchTerm = req.params.searchterm;
   var offset = req.query.offset;
   console.log("OFFSET: "+offset);
});


PROBLEM:

When I go to /lol?offset=10, nothing gets logged to the console.

What's the issue ?



via Coder1000

No comments:

Post a Comment