Currently I have a beta version of a website set up and production website set up. I can not get the agent to send it to both. Right now it only sends it to the last site in my code.
`
function httpPostInsert(data, url) {
server.log(data);
local request = http.post(url, {“Content-Type”: “application/x-www-form-urlencoded”}, data)
local response = request.sendsync();
return response;
}
To add to Phil’s point: the second “device.on” is overwriting the first. Only the most-recently-registered handler (per event name) is called. Per the docs: “Setting a new handler for an existing event name will prevent the old handler from being called.”