Pipe content into curl and upload it as request body.
Section: Uploads
Upload from stdin
bash
bash
printf 'hello\n' | curl -T - https://example.com/upload.txtExplanation
`-T -` reads upload data from standard input.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Uploads
Append to a remote file
Append uploaded data when the protocol and server support it.
Retry on all errors
Retry on all errors, including transient HTTP failures when appropriate.