% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{atlas_ok}
\alias{atlas_ok}
\title{Check if the Atlas service is reachable}
\usage{
atlas_ok(url = "http://atlas.patrimoines.culture.fr/atlas/trunk/", timeout = 4)
}
\arguments{
\item{url}{A \code{character} string of length 1. The URL of the service to test.
Default is \code{"http://atlas.patrimoines.culture.fr/atlas/trunk/"}.}

\item{timeout}{Numeric. Maximum time in seconds allowed for the request
(including connection and response). Default is \code{4}.}
}
\value{
A \code{logical} scalar:
\itemize{
\item \code{TRUE} if the service responds with an HTTP status code < 400
\item \code{FALSE} otherwise (error, timeout, or HTTP status >= 400)
}
}
\description{
Performs a lightweight HTTP request to test whether a remote service
(typically the French cultural heritage Atlas) is reachable within a
specified timeout. The function uses a \code{HEAD} request to avoid downloading
content and returns a logical indicating availability.
}
\details{
This function is designed to be robust and silent: any network error
(timeout, DNS failure, connection refusal, etc.) results in \code{FALSE}.

The function relies on \pkg{httr2} and internally performs a \code{HEAD} request
using \code{httr2::req_perform()}. It does not modify global options and
does not raise errors.

Note that this function checks \strong{service reachability}, not full
functional correctness of the endpoint.
}
\keyword{internal}
