下面的REST API查询到MongoLab数据库工作正常,在浏览器中:
VAR URL = https://api.mongolab.com/api/1/databases/sis/collections/my-coll?q= {22object%20typ%至22%:22 %%}&apikey 22object 20types%=
然而,当我使用谷歌appscript的UrlFetchApp,如下所示:
VAR oDataObject = JSON.parse(UrlFetchApp.fetch(URL).getContentText());
..then appscript返回以下错误:
参数无效: https://api.mongolab.com/api/1/databases/my-db/collections/my-coll?q=
没有人知道如何解决这个怪癖在谷歌appscript UrlFetchApp?