doPost (e) nie zwraca parametrów, ale robi doGet (e)?
Nigdzie w internecie nie ma tego konkretnego problemu ani poprawki, więc tutaj idzie:
Moja aplikacja zawiera następujące elementydoGet()
idoPost()
Funkcje:
function doGet (e){return ContentService.createTextOutput("User says: "+JSON.stringify(e))}
function doPost(e){return ContentService.createTextOutput("User says: "+JSON.stringify(e))}
GET http://*published URL*/+params
zwraca:
User says:
{
"queryString":"testparamA=abc&testparamB=bcd&testparamC=cde",
"parameter":
{
"testparamA":"abc",
"testparamB":"bcd",
"testparamC":"cde"
},
"contextPath":"",
"parameters":
{
"testparamA":["abc"],
"testparamB":["bcd"],
"testparamC":["cde"]
},
"contentLength":-1
}
Natomiast,POST http://*published URL*/+params
zwraca:
User says:
{
"queryString":null,
"parameter":{},
"contextPath":"",
"parameters":{},
"contentLength":0
}
Moim celem jest dostęp doPOST
parametry. Ale wydaje się, że coś blokuje pobieranie skryptu po przesłaniu za pomocąPOST
metoda.GET
wydaje się działać dobrze.
Czego mi brakuje i jakie jest rozwiązanie?