Skip to content

Instantly share code, notes, and snippets.

@tomabroad
Last active December 18, 2015 03:38
Show Gist options
  • Save tomabroad/5719415 to your computer and use it in GitHub Desktop.
Save tomabroad/5719415 to your computer and use it in GitHub Desktop.
// how to send parameters on GAS server using doGet(e)
//
// get the two parameters 'a' and 'b' and display the values
// Usage: https://...?a=1&b=2
//
// https://developers.google.com/apps-script/content_service
// http://ochi-lab.blogspot.jp/
//
function doGet(e) {
var a = e.parameters.a;
var b = e.parameters.b;
var str = 'a = ' + a + ', b = ' + b;
var output = ContentService.createTextOutput();
output.setMimeType(ContentService.MimeType.JSON);
output.setContent(str);
return output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment