Spec-Zone.ru › Nushell

url join for network

Convert a record to a URL string.

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

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/url_join.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API