url library
url library
Function
url standard library for URL encoding, decoding, parsing, query parameter reading and object building URLs.
API List
| API | Description |
|---|---|
| url.encode | Percent-encode the URL component of the current text. |
| url.decode | Percent decode the current text. |
| url.parse | Parse the current URL into an object. |
| url.query | Read the query parameter object of the current URL. |
| url.build | Build a URL string from an object configuration. |
| url.to_string | Returns the original text of the current URL. |
Examples
result = url('https://btlang.org/docs?q=BT%20Lang').query().q // Output: BT Lang print result
Notes
- encode/decode handles URL component text; please use parse for complete URL parsing.