doPost(e) does not return parameters but doGet(e) does?

后端 未结 3 1027
难免孤独
难免孤独 2021-01-06 23:59

Nowhere on the internet is this specific problem or a fix for it mentioned, so here goes:

My app contains the following doGet() and doPost()

3条回答
  •  -上瘾入骨i
    2021-01-07 00:24

    I think this is somewhat expected. When one does an HTTP GET the parameters are passed on the url. When it's a POST they go on the payload, not the url.

    Try calling post like this (Apps Script code):

    UrlFetchApp.fetch(scriptUrl, {method:'post', payload:'param1=value1¶m2=value2'});
    

提交回复
热议问题