I would like to run various test cases against my experimental code that I have setup for my Glide App table.
Here is the code:
https://glide-next-day-next-week.dawso.repl.co
(You pass it a day of the week (e.g. “Wednesday”) and a date. It returns the date of next Wednesday after the given date).
The column is being populated in Glide with the correct values.
Now I would like to run various scenarios against this code to make sure it works correctly which is much simpler to do server side, than inputting vales into the Glide Table for all the possible cases.
How do I pass the parameters and call this function from a non-glide server?
Here is what I have tried:
var dayName = “Wednesday”;
var refDate = new Date(“10/01/2021”);
var formData = {
‘dayName’: dayName,
‘refDate’: refDate
};
var options = {
'method': 'get',
'body': JSON.stringify(formData),
};
options.headers = {
'Content-Type': 'application/json'
}
// Service: https://glide-next-day-next-week.dawso.repl.co
var returnedData = UrlFetchApp.fetch("https://glide-next-day-next-week.dawso.repl.co/", options);
But this only returns the HTML in the index.html file Glide has you setup:
Glide Yes-Code