如何在Google Apps脚本中获取以哈希字符开头的参数?

时间:2018-10-09 12:07:42

标签: google-apps-script web-applications

我正在尝试对第三方Web服务进行身份验证。 发送到我的Google Web应用程序请求的服务看起来像

  

https://script.google.com/...exec#myvar1=1&myvar2=2

我在doGet收到请求

function doGet(e) {
  writeData(JSON.stringify(e));
}

在对象myvar1中看不到任何包含e的东西:

{"parameter":{},"contextPath":"","contentLength":-1,"queryString":"","parameters":{}}

但是,如果我在网址中将#更改为?

  

https://script.google.com/...exec#myvar1=1&myvar2=2

我会在myvar1属性中看到parameter

不幸的是,该URL是由第三方服务格式化的,因此我无法更改它。

0 个答案:

没有答案