Skip to main content

has_path_params

Function has_path_params 

Source
pub fn has_path_params(path: &str) -> bool
Expand description

Check if a URL path contains path parameter placeholders.

Detects both brace-style ({param}) and colon-style (:param) parameters, covering all major web frameworks.

ยงExamples

use apcore_toolkit::http_verb_map::has_path_params;

assert_eq!(has_path_params("/tasks"), false);
assert_eq!(has_path_params("/tasks/{id}"), true);
assert_eq!(has_path_params("/users/:userId"), true);