UrlFetchApp is not defined

余生颓废 提交于 2020-02-20 07:58:10

问题


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:


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.



来源:https://stackoverflow.com/questions/26458140/urlfetchapp-is-not-defined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!