nushell/crates/nu-command/src/network
Bahex 719d9aa83c
provide a common implementation for query string conversions in url join and url build-query (#14173)
Addresses one of the points in #14162

# Description

Factors out part of the `url::build_query::to_url` function into a
separate function `url::query::record_to_qs()`, which is then used in
both `url::build_query` and `url::join`.

# User-Facing Changes

Like with `url build-query` (after #14073), `url join` will allow list
values in `params` and behavior of two commands will be same.

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

> {scheme: "http", host: "host", params: {a: ["one", "two"], b: "three"}} | url join 
"http://host?a=one&a=two&b=three"
```

# Tests + Formatting

Added an example to `url join` for the new behavior.
2024-10-29 06:33:14 -05:00
..
http Make get_env_var return a reference to a Value (#13987) 2024-10-02 13:05:48 +02:00
url provide a common implementation for query string conversions in url join and url build-query (#14173) 2024-10-29 06:33:14 -05:00
mod.rs fetch -> http get and post -> http post (#7796) 2023-01-20 10:38:30 -08:00
port.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00