Given this URL:
https://script.google.com/macros/s/MacroName/dev?theArg="69.28.15.332"
The important part is on the end:
?theArg="69.28.15.332"
I'm trying to pass information to an Apps Script in the URL.
Why won't my .gs
Google Apps Script function get the value of the string at the end of the URL? This is the doGet(e)
function.
function doGet(e){
var passedInIP = e.parameter.theArg;
Logger.log(passedInIP);
if (passedInIP === "69.28.15.332")
{
return HtmlService.createHtmlOutput("<h2>something</h2>")
}
};
I get this error msg printed in the browser:
The script completed but did not return anything
The Logger.log
does log something. It logs [Date Time EDT] "69.28.15.332"
and the value is exactly the same in the log, as the value I'm checking for. But the equality test fails.