acumen/url
A URL type that preserves the original server-provided string.
ACME servers provide URLs in JSON responses and HTTP headers. RFC 8555 Section 6.4 requires the exact server-provided string in signed JWS headers. This type stores the raw string alongside the parsed URI so that serialization never alters the URL.
Types
Values
pub fn from_string(string: String) -> Result(Url, Nil)
Parses a string into a Url.
Succeeds only for absolute HTTPS URLs with a host.
pub fn to_string(url: Url) -> String
Returns the original string, byte-for-byte as received.