Skip to main content

parse_http_status_range

Function parse_http_status_range 

Source
pub fn parse_http_status_range(
    spec: &str,
) -> Result<HttpStatusRange, &'static str>
Expand description

Parse one accepted_statuses entry of the TOML file or the CLI:

  • "any": every valid status, 100-599 — any well-formed HTTP response;
  • "Nxx" with N in 1..=5: the class N00-N99;
  • "A-B": the inclusive range A..=B;
  • "A": the single status A.

Bounds must lie in 100..=599 and A <= B.