diff --git a/crates/nu-command/src/network/http/options.rs b/crates/nu-command/src/network/http/options.rs index 394428586c..146383cd17 100644 --- a/crates/nu-command/src/network/http/options.rs +++ b/crates/nu-command/src/network/http/options.rs @@ -72,7 +72,7 @@ impl Command for SubCommand { } fn extra_usage(&self) -> &str { - "Performs HTTP OPTIONS operation." + "Performs an HTTP OPTIONS request. Most commonly used for making CORS preflight requests." } fn search_terms(&self) -> Vec<&str> { @@ -111,6 +111,11 @@ impl Command for SubCommand { example: "http options -H [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com", result: None, }, + Example { + description: "Simulate a browser cross-origin preflight request from www.example.com to media.example.com", + example: "http options https://media.example.com/api/ -H [Origin https://www.example.com Access-Control-Request-Headers \"Content-Type, X-Custom-Header\" Access-Control-Request-Method GET]", + result: None, + }, ] } }