url join
for network
Converts a record to url.
Signature
> url join {flags}
Input/output types:
input | output |
---|---|
record | string |
Examples
Outputs a url representing the contents of this record, params
and query
fields must be equivalent
> {
"scheme": "http",
"username": "",
"password": "",
"host": "www.pixiv.net",
"port": "",
"path": "/member_illust.php",
"query": "mode=medium&illust_id=99260204",
"fragment": "",
"params":
{
"mode": "medium",
"illust_id": "99260204"
}
} | url join
http://www.pixiv.net/member_illust.php?mode=medium&illust_id=99260204
Outputs a url representing the contents of this record, "exploding" the list in params
into multiple parameters
> {
"scheme": "http",
"username": "user",
"password": "pwd",
"host": "www.pixiv.net",
"port": "1234",
"params": {a: ["one", "two"], b: "three"},
"fragment": ""
} | url join
http://user:pwd@www.pixiv.net:1234?a=one&a=two&b=three
Outputs a url representing the contents of this record
> {
"scheme": "http",
"username": "user",
"password": "pwd",
"host": "www.pixiv.net",
"port": "1234",
"query": "test=a",
"fragment": ""
} | url join
http://user:pwd@www.pixiv.net:1234?test=a
Outputs a url representing the contents of this record
> {
"scheme": "http",
"host": "www.pixiv.net",
"port": "1234",
"path": "user",
"fragment": "frag"
} | url join
http://www.pixiv.net:1234/user#frag