10. Boost package for the URI parser
The uriparser_boost module implements additional infrastructure for the URI parser.
All functions and symbols are in “uriparser_boost” module, use require to get access to it.
require daslib/uriparser_boost
10.1. Split and compose
- uri_split_full_path(uri: Uri const implicit)
uri_split_full_path returns array<string>
| argument | argument type | 
|---|---|
| uri | uriparser::Uri const implicit | 
Split the full path of a URI into its components.
- uri_compose_query(query: table<string;string> const)
uri_compose_query returns string const
| argument | argument type | 
|---|---|
| query | table<string;string> const | 
Compose a query string from a table of key-value pairs.
- uri_compose_query_in_order(query: table<string;string> const)
uri_compose_query_in_order returns string const
| argument | argument type | 
|---|---|
| query | table<string;string> const | 
Compose a query string from a table of key-value pairs, in the sorted order.
- uri_compose(scheme: string const; userInfo: string const; hostText: string const; portText: string const; path: string const; query: string const; fragment: string const)
uri_compose returns uriparser::Uri
| argument | argument type | 
|---|---|
| scheme | string const | 
| userInfo | string const | 
| hostText | string const | 
| portText | string const | 
| path | string const | 
| query | string const | 
| fragment | string const | 
Compose a URI from its components.
10.2. Component accessors
- scheme(uri: Uri const implicit)
scheme returns string const
| argument | argument type | 
|---|---|
| uri | uriparser::Uri const implicit | 
Returns the scheme of a URI.
- user_info(uri: Uri const implicit)
user_info returns string const
| argument | argument type | 
|---|---|
| uri | uriparser::Uri const implicit | 
Return the user info of a URI.
- host(uri: Uri const implicit)
host returns string const
| argument | argument type | 
|---|---|
| uri | uriparser::Uri const implicit | 
Return the host of a URI.
- port(uri: Uri const implicit)
port returns string const
| argument | argument type | 
|---|---|
| uri | uriparser::Uri const implicit | 
Return the port of a URI.
- path(uri: Uri const implicit)
path returns string const
| argument | argument type | 
|---|---|
| uri | uriparser::Uri const implicit | 
Return the path of a URI.
- query(uri: Uri const implicit)
query returns string const
| argument | argument type | 
|---|---|
| uri | uriparser::Uri const implicit | 
Return the query of a URI.
- fragment(uri: Uri const implicit)
fragment returns string const
| argument | argument type | 
|---|---|
| uri | uriparser::Uri const implicit | 
Return the fragment of a URI.