The following REST API query to the MongoLab database works fine in a browser:
var url = https://api.mongolab.com/api/1/databases/sis/collections/my-coll?q={%22Object%20Type%22:%22Object%20Types%22}&apiKey=
However, when I use Google appscript's UrlFetchApp, as follows:
var oDataObject = JSON.parse(UrlFetchApp.fetch(url).getContentText());
..then appscript returns the following error:
Invalid argument: https://api.mongolab.com/api/1/databases/my-db/collections/my-coll?q=
Does anyone know how to work around this quirk in Google appscript UrlFetchApp?