mirror of
https://github.com/nushell/nushell.git
synced 2024-11-21 16:03:19 +01:00
Fix binary example and add one for text uploads (#14307)
# Description In #14291, I misunderstood the use-case for `into binary` with `http post`. Thanks again to @weirdan for steering me straight on that. This reverts the example that I changed and adds a new one for uploading text files. # User-Facing Changes Doc-only # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting N/A
This commit is contained in:
parent
07ad24ab97
commit
a541382776
@ -128,8 +128,13 @@ impl Command for SubCommand {
|
|||||||
result: None,
|
result: None,
|
||||||
},
|
},
|
||||||
Example {
|
Example {
|
||||||
description: "Upload a file to example.com",
|
description: "Upload a binary file to example.com",
|
||||||
example: "http post --content-type multipart/form-data https://www.example.com { file: (open -r file.mp3 | into binary) }",
|
example: "http post --content-type multipart/form-data https://www.example.com { file: (open -r file.mp3) }",
|
||||||
|
result: None,
|
||||||
|
},
|
||||||
|
Example {
|
||||||
|
description: "Convert a text file into binary and upload it to example.com",
|
||||||
|
example: "http post --content-type multipart/form-data https://www.example.com { file: (open -r file.txt | into binary) }",
|
||||||
result: None,
|
result: None,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user