Hi Andy, Your URL actually does return '13' for me with Zinc following the redirect:
So the question is why doesn't it work for you ? Which version of Pharo and/or Zinc are you using ? Are you behind a proxy ? Sven On 16 Aug 2014, at 16:55, Andy Burnett <andy.burn...@knowinnovation.com> wrote: > Hello, > > Google Apps Scripts allows me to create a webapp function that returns json. > For security reasons the url to call the function returns a redirection. For > example > > Curl > https://script.google.com/macros/s/AKfycbyjVyXa9cYqYZg6kfSdiT8l6S0Q3LEzn6FvonoI1G1MzXeegrOB/exec > > Returns an html page with the redirection information, whereas > > curl -L > https://script.google.com/macros/s/AKfycbyjVyXa9cYqYZg6kfSdiT8l6S0Q3LEzn6FvonoI1G1MzXeegrOB/exec > > Returns the json value (currently 13) > > I tried to use ZnClient to do the same thing, and I thought that ZnClient > automatically followed redirections, but when I inspect the value it seems to > actually return a larger html page, rather than the json. My Pharo code is: > > (ZnClient new) get: > 'https://script.google.com/macros/s/AKfycbyjVyXa9cYqYZg6kfSdiT8l6S0Q3LEzn6FvonoI1G1MzXeegrOB/exec'. > > Do I have to set any other options? > > Please Note: this is my first experiment with Google App Scripts, so it is > very likely that the problem is with my script, rather than Pharo. However, > the script does seem to be returning the correct value in the browser, so it > might be some interaction between the two. > > Cheers > Andy > ᐧ