I am trying to write a script on the GS that would ping an arbitrary host using an external resource. I chose http://ping.eu/ping as a resource.
I figured out what kind of good thing is to write something like this:
var response = UrlFetchApp.fetch("http://ping.eu/ping/", pingEuOptions); where pingEuOptions is something like this:
var pingEuOptions = { "method" : "post", "host" : "127.0.0.1" }; But as a result I get a page with an empty form, without output. The only useful result is the IP from which Google knocked there. If I understand everything correctly, sending a POST or GET method (in the code of the page it is written that the post is used) to the correct address with the form data should call submit and the answer I receive if I poke the corresponding button in the browser, but here it seems that submit not happening.
I also found that if I go to http://ping.eu/ping/action.php?host=127.0.0.1 , I get a page with a filled host field, but I can’t find what else to add to this form (name she has "frm") submit run, so I tread on the same place.
Previously, it did not work with HTTP and I also have extremely modest experience in GoogleScript, so I can safely call myself a teapot in this matter. Surely everything is solved very simply, but it does not reach me, and there is no cap near. Kind people, explain to a teapot how to make tea via HTTP?