mock_matches_request

Function mock_matches_request 

Source
pub fn mock_matches_request(
    mock: &MockConfig,
    method: &str,
    path: &str,
    headers: &HashMap<String, String>,
    query_params: &HashMap<String, String>,
    body: Option<&[u8]>,
) -> bool
Expand description

Check if a request matches the given mock configuration

This function implements comprehensive request matching including:

  • Method and path matching
  • Header matching (with regex support)
  • Query parameter matching
  • Body pattern matching (exact, regex, JSONPath, XPath)
  • Custom matcher expressions