URI¶
URI Parsing¶
omni_web provides API for parsing URIs (omni_web.text_to_uri) that is also available through by casting text
to omni_web.uri.
results in
| Column | Value | 
|---|---|
| scheme | http | 
| user_info | foo:bar | 
| host | example.com | 
| path | path/to/page | 
| port | 8080 | 
| query | query | 
| fragment | frag | 
URL/URI Encoding¶
Functionality for URL encoding
String encoding for a URL¶
To encode a string to be safely included as part of a URL:
You will get Hello%20World
To decode and get back to the original string:
Encoding a URI¶
Similar to JavaScript's encodeUri/decodeUri, you can also encode/decode a URI without encoding the "unreserved
marks":
The above results in http://hu.wikipedia.org/wiki/S%C3%A3o_Paulo
A counterpart function to that is uri_decode.