Skip to main content

Crate vld_http_common

Crate vld_http_common 

Source
Expand description

§vld-http-common — Shared HTTP helpers for vld web integrations

This crate provides common utility functions used by vld-axum, vld-actix, vld-rocket, vld-poem, and vld-warp.

Not intended for direct use by end users — import via the framework-specific crate instead.

Functions§

coerce_value
Coerce a raw string value into a typed JSON value.
cookies_to_json
Build a JSON object from a Cookie header value.
extract_path_param_names
Extract parameter names from a route pattern like /users/{id}/posts/{post_id}.
format_issues
Format a VldError into a JSON array of issues.
format_issues_with_code
Format issues with an additional "code" key from IssueCode::key().
format_vld_error
Format a VldError into a JSON object with "error" and "issues" keys — ready to be sent as a 422 response body.
parse_query_string
Parse a URL query string into a serde_json::Map.
query_string_to_json
Parse a URL query string into a serde_json::Value::Object.
url_decode
Minimal percent-decode for URL query parameters.