apimock-routing 5.17.0

Routing model for apimock: rule sets, request matching, and read-only views for GUI tooling.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::{rule_set::prefix::Prefix, util::http::normalize_url_path};

/// url path merged with prefix and then normalized
pub fn url_path_with_prefix(url_path: &str, rule_set_prefix: Option<&Prefix>) -> String {
    let url_path_prefix = if let Some(prefix) = rule_set_prefix {
        prefix.url_path_prefix.as_deref()
    } else {
        None
    };

    normalize_url_path(url_path, url_path_prefix)
}