nushell/crates/nu-command/src
Bahex c7e128eed1
add table params support to url join and url build-query (#14239)
Add `table<key, value>` support to `url join` for the `params` field,
and as input to `url build-query` #14162

# Description
```nushell
{
    "scheme": "http",
    "username": "usr",
    "password": "pwd",
    "host": "localhost",
    "params": [
        ["key", "value"];
        ["par_1", "aaa"],
        ["par_2", "bbb"],
        ["par_1", "ccc"],
        ["par_2", "ddd"],
    ],
    "port": "1234",
} | url join
```
```
http://usr:pwd@localhost:1234?par_1=aaa&par_2=bbb&par_1=ccc&par_2=ddd
```

---

```nushell
[
    ["key", "value"];
    ["par_1", "aaa"],
    ["par_2", "bbb"],
    ["par_1", "ccc"],
    ["par_2", "ddd"],
] | url build-query
```
```
par_1=aaa&par_2=bbb&par_1=ccc&par_2=ddd
```

# User-Facing Changes

## `url build-query`

- can no longer accept one row table input as if it were a record

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2024-11-06 08:09:40 -06:00
..
bytes Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
charting Replace raw usize IDs with new types (#13832) 2024-09-30 13:20:15 +02:00
conversions update human-date-parser conversion to use local timezone (#14266) 2024-11-06 07:14:00 -06:00
database Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
date Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
debug Reduce duplicate dependencies on the windows crate (#14105) 2024-10-20 23:14:11 +02:00
env Reduce duplication in history path construction (#13475) 2024-10-11 07:51:50 -05:00
experimental Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
filesystem no deref in touch (#14214) 2024-11-03 00:56:05 -04:00
filters support binary input in length (#14224) 2024-11-04 03:39:24 +00:00
formats Make to text line endings consistent for list (streams) (#14166) 2024-11-05 09:33:54 +01:00
generators Remove as_i64 and as_f64 (#14258) 2024-11-05 09:28:56 +01:00
hash add binary as input to hash commands (#13923) 2024-09-25 16:47:52 +08:00
help add is_const to help commands and scope commands (#14125) 2024-10-21 12:54:18 +02:00
math Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
misc Replace raw usize IDs with new types (#13832) 2024-09-30 13:20:15 +02:00
network add table params support to url join and url build-query (#14239) 2024-11-06 08:09:40 -06:00
path fix path exists on a non-directory file (#13763) 2024-09-11 12:45:39 -05:00
platform Drop once_cell dependency (#14198) 2024-10-29 17:33:46 +01:00
random support filesize arguments in random binary/chars (#14068) 2024-10-12 14:49:05 +08:00
removed Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
shells Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
stor feat: stor insert accepts lists (#14175) 2024-10-29 06:32:55 -05:00
strings Drop once_cell dependency (#14198) 2024-10-29 17:33:46 +01:00
system Improve comment wording in run_external.rs (#14230) 2024-11-01 18:02:25 +01:00
viewers Drop once_cell dependency (#14198) 2024-10-29 17:33:46 +01:00
default_context.rs Url split query (#14211) 2024-11-06 07:35:37 -06:00
example_test.rs Overhaul $in expressions (#13357) 2024-07-17 16:02:42 -05:00
lib.rs Add top-level crate documentation/READMEs (#12907) 2024-07-14 10:10:41 +02:00
progress_bar.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
sort_utils.rs Rework sorting and add cell path and closure comparators to sort-by (#13154) 2024-10-09 19:18:16 -07:00