nushell/crates/nu-command/tests/commands/network/http
jflics6460 154856066f
Accept records for http subcommand headers (-H) (#9771)
# Description

See also: #9743 
Before: 
`http <subcommand> -H` took a list in the form:

```nushell
[my-header-key-A my-header-value-A my-header-key-B my-header-value-B]
```

Now:
In addition to the old format, Records can be passed, For example,
```nushell
> let reqHeaders = {
    Cookie:  "acc=barfoo",
    User-Agent: "Mozilla/7.0 (Windows NT 33.0; Win64; x64) AppleWebKit/1038.90 (KHTML, like Gecko)"
}
> http get -H $reqHeaders https://example.com
```

is now equivalent to
```nushell
http get -H [Cookie "acc=barfoo" User-Agent "Mozilla/7.0 (Windows NT 33.0; Win64; x64) AppleWebKit/1038.90 (KHTML, like Gecko)"] https://example.com
```

# User-Facing Changes
No breaking changes, but Records can now also be passed to `http
<subcommand> -H`.

# Tests + Formatting
# After Submitting
2023-07-30 22:28:48 +02:00
..
delete.rs changes Reqwest to Ureq. (#8320) 2023-03-05 14:48:13 -08:00
get.rs Accept records for http subcommand headers (-H) (#9771) 2023-07-30 22:28:48 +02:00
head.rs changes Reqwest to Ureq. (#8320) 2023-03-05 14:48:13 -08:00
mod.rs add http options command (#9365) 2023-06-09 08:00:40 -05:00
options.rs add http options command (#9365) 2023-06-09 08:00:40 -05:00
patch.rs changes Reqwest to Ureq. (#8320) 2023-03-05 14:48:13 -08:00
post.rs Fix record-to-JSON conversion for HTTP commands (#8663) 2023-03-29 11:55:51 -07:00
put.rs changes Reqwest to Ureq. (#8320) 2023-03-05 14:48:13 -08:00