Validates that an HTTP response has a success status code (200-299). Throws an informative error on failure.
See also
Other http-utils:
http-utils,
http_retry()
Examples
if (FALSE) { # \dontrun{
httr2::request("https://api.example.com") |>
httr2::req_perform() |>
http_validate_status(context = "fetching user data")
} # }
