Skip to main content

ash_normalize_binding_from_url

Function ash_normalize_binding_from_url 

Source
pub fn ash_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::ash_normalize_binding_from_url;

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