url build-query
for network
Converts record or table into query string applying percent-encoding.
Signature
> url build-query {flags}
Input/output types:
input | output |
---|---|
record | string |
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