URI references as RFC 3986 defines them: parsing, recomposing, resolving and percent coding by component, form encoding, and data URLs. No sockets.
Dependencies
let base = @moonurl.Url::decode("http://a/b/c/d;p?q")
base.resolve(@moonurl.Url::decode("../g")).encode() // "http://a/b/g"
@moonurl.escape_text("a b&c/d", kind=Query) // "a%20b&c/d"
@moonurl.Query::decode(b"q=two+words&tag=a&tag=b").values("tag") // ["a", "b"]
@dataurl.Url::decode("data:,A%20brief%20note").data // b"A brief note"| Package | What | Specification |
|---|---|---|
| moonurl | URI references: parsing, recomposing, resolving, normalising, percent coding by component | RFC 3986 |
| moonurl | Query: the pairs of a query or a form body, read and written as application/x-www-form-urlencoded | WHATWG URL Standard §5 |
| moonurl/dataurl | A whole representation written inside the reference to it | RFC 2397 |
fn normalize_escapes(text : StringView) -> Stringfn remove_dots(path : String) -> Stringfn unescape(raw : BytesView) -> Bytesfn unescape_text(text : StringView) -> StringInstall
Download zipURI references as RFC 3986 defines them: parsing, recomposing, resolving and percent coding by component, form encoding, and data URLs. No sockets.
Dependencies