From 6c7129cc0c1cdeb5a85b4aa3cefa27dc1a2eb235 Mon Sep 17 00:00:00 2001 From: Douglas <32344964+NotTheDr01ds@users.noreply.github.com> Date: Sat, 9 Nov 2024 19:09:17 -0500 Subject: [PATCH] Fix multipart/form-data post example (#14291) # Description Thanks to @weirdan [in Discord](https://discord.com/channels/601130461678272522/614593951969574961/1304508148207583345) for pointing out that correct syntax for `http post --content-type multipart/form-data`. The existing example was incomplete, so I've updated it. # User-Facing Changes Doc-only # Tests + Formatting `toolkit test` currently seems to be broken, so relying on CI # After Submitting N/A --- crates/nu-command/src/network/http/post.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/nu-command/src/network/http/post.rs b/crates/nu-command/src/network/http/post.rs index fbe780294b..1d144f7d16 100644 --- a/crates/nu-command/src/network/http/post.rs +++ b/crates/nu-command/src/network/http/post.rs @@ -129,7 +129,7 @@ impl Command for SubCommand { }, Example { description: "Upload a file to example.com", - example: "http post --content-type multipart/form-data https://www.example.com { audio: (open -r file.mp3) }", + example: "http post --content-type multipart/form-data https://www.example.com { file: (open -r file.mp3 | into binary) }", result: None, }, ]