uce/site/doc/pages/parse_uri.txt
2026-06-15 11:06:35 +00:00

29 lines
662 B
Plaintext

:sig
URI parse_uri(String uri_string)
:params
uri_string : URI or URL string
return value : URI object with `parts` and `query` maps
:see
>uri
parse_query
uri_decode
uri_encode
:content
Parses a URI into its component maps.
`return.parts` contains the parsed URI fields. `return.query` contains query parameters decoded with the same rules as `parse_query()`.
Example:
```uce
URI uri = parse_uri("https://example.test/docs/index.uce?q=uce#top");
String host = uri.parts["host"];
String path = uri.parts["path"];
String q = uri.query["q"];
```
Use `parse_uri()` when you need to inspect a full URL. Use `parse_query()` when you only have the query string.