8b8d3e577ec06df76ec8b2e3635f17e42c1e40a7
http, https, and a few other urls can be assumed to be possible schemes. If we check for these then we cut down on the character by character parsing that would otherwise happen
uri
Uri (RFC 3986) library for Gleam
gleam add uri@1
import uri
pub fn main() {
let uri = uri.parse("http://example.com:8080/path?q=1")
|> result.unwrap(types.empty_uri)
uri.normalise(uri) |> uri.to_string |> echo
}
Further documentation can be found at https://hexdocs.pm/uri.
Development
gleam run # Run the project
gleam test # Run the tests
Description
v2.0.4
Latest
Languages
Gleam
99.5%
JavaScript
0.5%