build_query_param

Function build_query_param 

Source
pub fn build_query_param(key: &str, value: &str) -> (String, String)
Expand description

Safely builds a query parameter tuple with URL encoding.

This is a convenience function for building query parameter tuples with proper URL encoding applied to the value.

§Security

Prevents query parameter injection by encoding special characters.

§Examples

use veracode_platform::validation::build_query_param;

let param = build_query_param("name", "My App & Co");
assert_eq!(param.0, "name");
assert_eq!(param.1, "My%20App%20%26%20Co");