OK, for posterity, here’s what I did.
I used MMM-Remote-Control and created a button element that calls a function that issues a get request. Interestingly, when I put the URL in the button code the request was rejected (no cross-origin request allowed) but when after I put the URL in the function it worked.
function toggleCal() {
var myUrl = "http://mypi.local:8080/remote?action=TOGGLE&module=MMM-CalendarExt";
console.log("getting " + myUrl)
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", myUrl, false); // false for synchronous request
xmlHttp.send(null);
return xmlHttp.responseText;
};
The button code gets mangled here. I had to add spaces
< button onclick="toggleCal()">Calender on/off< /button>