try_GET {sotkanet} | R Documentation |
HTTP function: try_GET
Description
Constructs a function for trying an URL
Usage
try_GET(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://community.rstudio.com/t/internet-resources-should-fail-gracefully/49199
[Package sotkanet version 0.9.79 Index]