UrlFetchApp is not defined

2020-07-09 08:21发布

I am calling UrlFetchApp.fetch("www.google.com")

from my chrome javascript code and I am getting:

Uncaught ReferenceError: UrlFetchApp is not defined

Anyone know why it is not defined? I thought it was built in.

1条回答
相关推荐>>
2楼-- · 2020-07-09 08:59

URL Fetch Service and its UrlFetchApp class are part of Google Apps Script - a javascript-based server-side scripting language that allows you to extend Google Apps products like Docs, Sheets and Forms with custom functionality.

UrlFetchApp class is NOT available in client-side javascript, which is what it looks like you are trying to do. You can only use it in server-side Google Apps Script .gs files.

查看更多
登录 后发表回答