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
Cookieheader value. - extract_
path_ param_ names - Extract parameter names from a route pattern like
/users/{id}/posts/{post_id}. - format_
issues - Format a
VldErrorinto a JSON array of issues. - format_
issues_ with_ code - Format issues with an additional
"code"key fromIssueCode::key(). - format_
vld_ error - Format a
VldErrorinto 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.