Constructs a function for trying an URL
URL to query
Timeout time in seconds.
HTTP response or a conditionMessage
Pyry Kantanen (maintainer), Kostas Vasilopoulos
Gracefully failing HTTP request code (slightly adapted by Pyry Kantanen) from RStudio community member kvasilopoulos. Many thanks!
Source of the original RStudio community discussion: https://community.rstudio.com/t/internet-resources-should-fail-gracefully/49199
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.