Skip to main content

normalize_binding_from_url

Function normalize_binding_from_url 

Source
pub fn normalize_binding_from_url(
    method: &str,
    full_path: &str,
) -> Result<String, AshError>
Expand description

Normalize a binding from a full URL path (including query string).

This is a convenience function that extracts the query string from the path.

ยงExample

use ash_core::normalize_binding_from_url;

let binding = normalize_binding_from_url("GET", "/api/users?page=1&sort=name").unwrap();
assert_eq!(binding, "GET|/api/users|page=1&sort=name");