How are multiple parameters handled?

I am trying to use URLs that involve more than one parameter, such as:


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?

You’ll have to be more specific.

Most of us use JSON along with PHP or whatever server-side scripting is used. You can send a whole array of values.

See this:

PHP can encode or decode JSON just as the Agent can do it.

And also decode:

So describe which direction you’re going …
Agent to website
website to Agent

And also what is happening on the web side … PHP, or some other API?

Take a look at the agents section of the Getting Started Guide:

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"]; } // ... });