nushell/crates
Kira a86a7e6c29
Allow http commands' automatic redirect-following to be disabled (#11329)
Intends to close #8920 

This PR suggests a new flag for the `http` commands, `--redirect-mode`,
which enables users to choose between different redirect handling modes.
The current behaviour of letting ureq silently follow redirects remains
the default, but two new options are introduced here, following the lead
of [JavaScript's `fetch`
API](https://developer.mozilla.org/en-US/docs/Web/API/fetch#redirect):
"manual", where any 3xx response to a request is simply returned as the
command's result, and "error", where any 3xx response causes a network
error like those caused by 4xx and 5xx responses.

This PR is a draft. Tests have not been added or run, the flag is
currently only implemented for the `http get` command, and design tweaks
are likely to be appropriate.

Most notably, it's not obvious to me whether a single flag which can
take one of three values is the nicest solution here.
We might instead consider two binary flags (like
`--no-following-redirects` and `--disallow-redirects`, although I'm bad
at naming things so I need help with that anyway), or completely drop
the "error" option if it's not deemed useful enough. (I personally think
it has some merit, especially since 4xx and 5xx responses are already
treated as errors by default; So this would allow users to treat only
immediate 2xx responses as success)

# User-facing changes
New options for the `http [method]` commands. Behaviour remains
unchanged when the command line flag introduced here is not used.


![image](https://github.com/nushell/nushell/assets/12228688/1eb89f14-7d48-4f41-8a3e-cc0f1bd0a4f8)
2023-12-28 15:26:34 +08:00
..
nu_plugin_custom_values Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu_plugin_example Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu_plugin_formats Bump ical from 0.8.0 to 0.9.0 (#11419) 2023-12-25 09:23:27 +08:00
nu_plugin_gstat Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu_plugin_inc Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu_plugin_python remove vectorize_over_list from python plugin (#9905) 2023-08-03 16:46:48 +02:00
nu_plugin_query Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-cli fix: prevent greedy matching of directory names (#11403) 2023-12-23 00:06:00 -06:00
nu-cmd-base Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-cmd-dataframe Make polars deps optional for cargo test --all (#11415) 2023-12-24 13:12:31 +01:00
nu-cmd-extra Bump fancy-regex to single 0.12.0 version (#11389) 2023-12-21 17:10:33 +01:00
nu-cmd-lang Bump fancy-regex to single 0.12.0 version (#11389) 2023-12-21 17:10:33 +01:00
nu-color-config Construct Records only through checked helpers (#11386) 2023-12-21 16:48:15 +01:00
nu-command Allow http commands' automatic redirect-following to be disabled (#11329) 2023-12-28 15:26:34 +08:00
nu-engine Make Call::get_flag_expr return Expression by ref (#11388) 2023-12-21 16:42:07 +01:00
nu-explore Bump lscolors from 0.15.0 to 0.16.0 (#11359) 2023-12-21 16:08:19 +00:00
nu-glob Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-json Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-lsp Make hover equal to help command (#11320) 2023-12-15 11:39:19 -06:00
nu-parser More specific errors for missing values in records (#11423) 2023-12-27 10:15:12 +01:00
nu-path Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-plugin Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-pretty-hex Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-protocol Remove unnecessary replace_in_variable (#11424) 2023-12-26 18:46:49 +01:00
nu-std disable directory submodule auto export (#11157) 2023-12-15 12:37:55 +01:00
nu-system Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-table Bump fancy-regex to single 0.12.0 version (#11389) 2023-12-21 17:10:33 +01:00
nu-term-grid Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-test-support Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-utils Bump lscolors from 0.15.0 to 0.16.0 (#11359) 2023-12-21 16:08:19 +00: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.