I am trying to use URLs that involve more than one parameter, such as:
/?firstParam=0&secondParam=1&thirdParam=2
I can’t seem to find any examples that demonstrate how this is accomplished with request handlers, and in turn passed to device functions. Any suggestions?
It covers using HTTP Query parameters. You code should look like this:
// agent code http.onrequest(function(req, resp) { local first = null; local second = null; local third = null; if ("firstParam" in req.query) { first = req.query["firstParam"]; } if ("secondParam" in req.query) { second = req.query["secondParam"]; } // ... });