test_connection {sotkanet} | R Documentation |
Test for internet connection, timeout and status
Description
Constructs a function for trying an URL
Usage
test_connection(url = NULL, timeout = 10)
Arguments
url |
URL to query |
timeout |
Timeout time in seconds. |
Value
HTTP response or a conditionMessage
Author(s)
Pyry Kantanen (maintainer), Kostas Vasilopoulos
Source
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
[Package sotkanet version 0.10.1 Index]