Check if a URL is online by making a HEAD request. Returns TRUE if the URL is reachable and the status code is between 200 and 399 (inclusive). Returns FALSE otherwise.
Details
This function is useful for checking the availability of a server or
resource before attempting to access it. In particular, it is used by
ed_info()
to check if the ERDDAP server is online before making requests
to it since the underlying rerddap::info()
crashes R if url
is offline.