# The fragment and credentials survive; clean_url drops both by design.
serialize_url("http://user:[email protected]:80/a/../b?q=1#frag")
get_clean_url("http://user:[email protected]:80/a/../b?q=1#frag")
# A present-but-empty delimiter carries information and is preserved.
serialize_url(c("http://example.com/", "http://example.com/#",
"http://example.com/?"))
# RFC 3986: source-preserving versus normalized.
serialize_url("HTTP://Example.COM:80/a/%7Euser/../x", standard = "rfc3986")
serialize_url("HTTP://Example.COM:80/a/%7Euser/../x", standard = "rfc3986",
form = "normalized")
# Any scheme is accepted; no scheme is not.
serialize_url(c("urn:ietf:rfc:2648", "mailto:[email protected]", "foo://h/x"))
serialize_url("example.com/x")
Run the code above in your browser using DataLab