try_GET: HTTP function: try_GET

View source: R/http_funs.R

try_GETR 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


rOpenGov/sotkanet documentation built on March 29, 2022, 6:46 p.m.