Skip to contents

Only the codes the transport treats as an outcome in themselves are classified. A 2xx is the caller's to interpret, since a 200 carrying an empty result may still be no_data once parsed.

Usage

classify_http(http)

Arguments

http

An HTTP status code.

Value

One of STATUS_LEVELS.

Examples

classify_http(404L)
#> [1] "no_data"
classify_http(429L)
#> [1] "rate_limited"
classify_http(503L)
#> [1] "error"