Google Apps Script를 사용하여 POST 요청의 매개 변수에 현재 액세스하려고합니다. e.parameter.name을 사용하여 객체의 키에 액세스 할 수는 없지만 e.parameter를 사용하여 params 객체를 로거 할 수 있습니다.XMLHttpRequest Google Apps Script의 매개 변수에 액세스
XMLHttpRequest를
var http = new XMLHttpRequest();
var url = "myappURL";
var params = JSON.stringify({employeeStatus: "Active", name: "Henry"});
http.open("POST", url, true);
//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
//Call a function when the state changes.
http.onreadystatechange = function() {
// call back function
} // end callback
http.send(params);
Google 애플리케이션 스크립트
function doPost(e) {
if (typeof e !== 'undefined') {
Logger.log(e.parameter.name); // does not work (undefined)
} // end if
} // end doPost
아마도이 스크립트의 공개 버전을 볼 수 있을까요? 전자 변수의 내용을 기록 할 때 – Sudsy
는 @Sudsy [링크] (https://script.google.com/d/1MxBNwUoG4I_F0Gt1GGYzNrr3m6PakhcDFxIA_g-nvoS-bRHx0IS5jgMJ/edit?usp=sharing) –