@Url()
New in 2.0Generate URLs
Network InformationSince 2.0.0
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| max | Integer | — | 50 | Max length, default 50 |
| protocol | String | — | http | Protocol (http/https), default http |
| domain | String | — | 127.0.0.1:8080 | Domain/IP, default 127.0.0.1:8080 |
| allowQueryParams | Boolean | — | false | Generate query parameters, default false |
Usage
@Url()Generate URL with default parameters
Example:
@Url()
Output:
http://127.0.0.1:8080/P1ZXOF9uI0/http://127.0.0.1:8080/Dcm@Url(max)Generate URL with specified domain
Example:
@Url(true)
Output:
http://www.xcan.org:8080/aacj/uics?acc=67&ubc7=8jFchttp://www.xcan.org:8080/aacj/uics?name=8jkc&gggbssiu=78hbss@Url(max,protocol,domain,allowQueryParams)Generate URL with query parameters
Example:
@Url(https,www.xcan.org,user|name,true)
Output:
https://www.xcan.org:8080/aacj/uics?user=67&name=8jFchttps://www.xcan.org:8080/aacj/uics?name=8jkc&user=78hbss