Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

url build-query for network

Converts record or table into query string applying percent-encoding.

Signature

> url build-query {flags}

Input/output types:

inputoutput
recordstring
table<key: any, value: any>string

Examples

Outputs a query string representing the contents of this record

> { mode:normal userid:31415 } | url build-query
mode=normal&userid=31415

Outputs a query string representing the contents of this record, with a value that needs to be url-encoded

> {a:"AT&T", b: "AT T"} | url build-query
a=AT%26T&b=AT+T

Outputs a query string representing the contents of this record, "exploding" the list into multiple parameters

> {a: ["one", "two"], b: "three"} | url build-query
a=one&a=two&b=three

Outputs a query string representing the contents of this table containing key-value pairs

> [[key, value]; [a, one], [a, two], [b, three], [a, four]] | url build-query
a=one&a=two&b=three&a=four