Hello,
Is it possible to get the response from a url though a vCO workflow? I would like to check the keepalive status of a webserver to see if the instance is running or not. All I want is to hit the url, say "https://webserverfqdn:port/keepalive.html/" and parse the response to figure out webserver is running. I don't want to SSH to the webserver to query the status. This is very starlight forward in javascript using xmlHTTPRequest. But, how can I achieve this using vRO?
Thanks
Here you go:
var website = new URL("https://webserverfqdn:port/keepalive.html");
var content = website.getContent();
Now "content" is a string that contains your website content that you may now parse as desired.
Here you go:
var website = new URL("https://webserverfqdn:port/keepalive.html");
var content = website.getContent();
Now "content" is a string that contains your website content that you may now parse as desired.
In addition to that: If you need some more fancy HTTP functionality (SSL support, authentication, ...) have a look at the REST Plugin for vRO. With that you can "render" http request very flexible, and easily generate re-usable workflows for these.
However, for your requirements it might be a bit of an overkill compared to Burke's two-liner 🙂
Regards,
Joerg
This thing worked. I did a workaround to implement the same thing using REST plugin. Adding RESTHost, creating RESTRequest, then parsing the RESTResponse. But, this one is really simple and straight forward. Just make sure to import all certs related to the web server. Thanks Burke