Data & codecs3 exports
Raw Markdown/codec/uri
Percent-encoding and application/x-www-form-urlencoded query-string serialization.
Functions & symbols#
decode-uri-component#
function
Decodes percent-encoded `%XX` sequences back to UTF-8 text.
| Parameter | Type | Optional | Description |
|---|---|---|---|
encoded | String | required | Percent-encoded string |
Returns:
Any(uri/decode-uri-component "hello%20world%21") ; -> "hello world!"encode-uri-component#
function
Percent-encodes reserved characters for safe inclusion in URL path segments or query values.
| Parameter | Type | Optional | Description |
|---|---|---|---|
text | String | required | Raw URI component text |
Returns:
Any(uri/encode-uri-component "hello world!") ; -> "hello%20world%21"to-urlencoded-string#
function
Serializes a Map of parameters as an `application/x-www-form-urlencoded` string.
| Parameter | Type | Optional | Description |
|---|---|---|---|
map | Map | required | Key-value query parameters map |
Returns:
Any(uri/to-urlencoded-string {:page 2 :q "rust"})