-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for HTTP OPTIONS method #9344
Comments
No clue what this means, please excuse my ignorance. Do you have examples and or pseudo code of how that would work in nushell? |
I'm not familiar with Rust or the nushell codebase, but it's just like any other HTTP method/verb. For example, with |
oh, interesting. i wonder if we could combine all our http subcommand and make it work like that? |
We can support that, but TBH I don't think it's a good idea, take |
with that in mind, i do not feel comfortable approving #9365 🤔 and on the other hand, if it's just another supported HTTP method, why not? i've never seen all these methods, so i do not have a strong opinion at all on this 😌 |
# Description closes: #9344 Different to other http commands, `http options` command always returns header, according to [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS), the response information is included in header. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect -A clippy::result_large_err` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass - `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. -->
Thanks for the quick turnaround on this! I have submitted a PR to improve the documented usage and examples: #9576 |
Related problem
There is no
http options
command, and no way to specify a custom HTTP verb. OPTIONS is useful for testing CORS implementations.Describe the solution you'd like
A new
http options
command that is implemented the same way as the other http commandsDescribe alternatives you've considered
No response
Additional context and details
No response
The text was updated successfully, but these errors were encountered: