assert_url: Assert Existence of URL

View source: R/assert_url.R

assert_urlR Documentation

Assert Existence of URL

Description

Assert that a Uniform Resource Locator (URL) is complete and valid. Requires that the httr package is available.

Usage

assert_url(url, ...)

Arguments

url

'character' string. URL

...

Other arguments passed to the httr::HEAD and httr::GET functions.

Value

Returns url invisibly. A NULL value is returned if the assertion fails for any reason.

Source

Code adapted from Stack Overflow, accessed on 2023-12-11 and authored by Bob Rudis.

Examples


assert_url("https://www.usgs.gov/")


inldata documentation built on Sept. 12, 2024, 9:34 a.m.