nushell/crates
Gonçalo Gomes ce4ea16c08
fix #10319: allow json request of value type list (#10356)
# Description

this commit adds the handling of Value::List when BodyType is Json
it also adds the corresponding test (trying to send a list)

Fixes #10319

# User-Facing Changes

Added the ability to send a json list in the POST message

# Tests + Formatting
- [x] `cargo fmt --all -- --check` to check standard code formatting
(`cargo fmt --all` applies these changes)
- [x] `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used`
to check that you're using the standard code style
- [x] `cargo test --workspace` to check that all tests pass (on Windows
make sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- [x] `cargo run -- -c "use std testing; testing run-tests --path
crates/nu-std"` to run the tests for the standard library

Also ran `nc -l -p 8080` in other terminal and `http post -fe -t
application/json http://localhost:8080 [{ field: true }]` I see the
following appear in the output of nc:
```
POST / HTTP/1.1
Host: localhost:8080
User-Agent: nushell
Accept: */*
Content-Type: application/json
accept-encoding: gzip
Content-Length: 16

[{"field":true}]%
```
2023-09-13 16:54:03 +02:00
..
nu_plugin_custom_values Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_example Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_formats Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_gstat Bump git2 from 0.17.2 to 0.18.0 (#10207) 2023-09-04 21:10:25 +00:00
nu_plugin_inc Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_python remove vectorize_over_list from python plugin (#9905) 2023-08-03 16:46:48 +02:00
nu_plugin_query Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-cli Deref &String arguments to &str where appropriate (#10321) 2023-09-12 14:06:56 +08:00
nu-cmd-base Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-cmd-dataframe Invert &Options to Option<&T> (#10315) 2023-09-13 07:00:58 +08:00
nu-cmd-extra Invert &Options to Option<&T> (#10315) 2023-09-13 07:00:58 +08:00
nu-cmd-lang Allow parse-time evaluation of if (#10326) 2023-09-12 21:35:47 +03:00
nu-color-config rename the types with spaces in them to use - (#9929) 2023-09-06 13:22:12 -05:00
nu-command fix #10319: allow json request of value type list (#10356) 2023-09-13 16:54:03 +02:00
nu-engine Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-explore Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-glob bump nushell to dev version 0.84.1 (#10101) 2023-08-23 15:23:27 -05:00
nu-json Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-parser Remove python-like string multiplication (#10293) 2023-09-13 19:52:04 +12:00
nu-path Support Termux (#10013) 2023-08-28 09:53:25 +03:00
nu-plugin Invert &Options to Option<&T> (#10315) 2023-09-13 07:00:58 +08:00
nu-pretty-hex Remove Cargo.lock in subcrates (#10280) 2023-09-09 00:45:43 +02:00
nu-protocol Remove python-like string multiplication (#10293) 2023-09-13 19:52:04 +12:00
nu-std Optimize use of range in std repeat (#10353) 2023-09-13 07:50:09 -05:00
nu-system Remove Cargo.lock in subcrates (#10280) 2023-09-09 00:45:43 +02:00
nu-table Patch restore lead trail space bg color (#10351) 2023-09-13 07:47:53 -05:00
nu-term-grid bump nushell to dev version 0.84.1 (#10101) 2023-08-23 15:23:27 -05:00
nu-test-support Deref &String arguments to &str where appropriate (#10321) 2023-09-12 14:06:56 +08:00
nu-utils Make cursor_shape optional (#10289) 2023-09-09 13:42:36 -05:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

Nushell core libraries and plugins

These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.

Foundational libraries are split into two kinds of crates:

  • Core crates - those crates that work together to build the Nushell language engine
  • Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.

Plugins are likewise also split into two types:

  • Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
  • Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.