I am writing a Googlescript to fetch the contents from an internal URL. I want to call that URL through the browser. Currently on calling using fetch, it never hits my internal server.
Asked
Active
Viewed 382 times
0
-
3Can you reach this internal server from outside your organization? The GAS FetchUrl will be executed from outside and it might be blocked by your firewall. – Ido Green Sep 29 '14 at 15:12
-
I cannot make the link public. So wanted to know if there is any other way to call the link through the browser itself (for eg, using Javascript) so that the call goes within the internal network. – Thejus Krishna Sep 30 '14 at 08:31
-
Does your script is a standalone script or does it display something to the user through a webapp? if so, (not tried) you may do your fetch in the webapp with classic JS: http://stackoverflow.com/questions/247483/http-get-request-in-javascript – Harold Sep 30 '14 at 14:48
1 Answers
1
If your internal server is preventing requests from Apps Script's UrlFetch, you may be able to send your request via HTMLService. However, there are restrictions to this; see HTTP restrictions. For your situation, these restrictions may prevent all such access through Apps Script.
Another (more complicated) approach would be to set up your internal server to allow external access with authorization.

Ryan Roth
- 1,394
- 9
- 15