test_connection | R Documentation |
Constructs a function for trying an URL
test_connection(url = NULL, timeout = 10)
url |
URL to query |
timeout |
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://forum.posit.co/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.