mirror of
https://github.com/curl/curl.git
synced 2024-12-09 06:30:06 +08:00
68784d73c3
The file format for each option now features a "Example:" header that can provide one or more examples that get rendered appropriately in the output. All options MUST have at least one example or gen.pl complains at build-time. This fix also does a few other minor format and consistency cleanups. Closes #7654
21 lines
796 B
Makefile
21 lines
796 B
Makefile
Long: data-binary
|
|
Arg: <data>
|
|
Help: HTTP POST binary data
|
|
Protocols: HTTP
|
|
Category: http post upload
|
|
Example: --data-binary @filename $URL
|
|
---
|
|
This posts data exactly as specified with no extra processing whatsoever.
|
|
|
|
If you start the data with the letter @, the rest should be a filename. Data
|
|
is posted in a similar manner as --data does, except that newlines and
|
|
carriage returns are preserved and conversions are never done.
|
|
|
|
Like --data the default content-type sent to the server is
|
|
application/x-www-form-urlencoded. If you want the data to be treated as
|
|
arbitrary binary data by the server then set the content-type to octet-stream:
|
|
-H "Content-Type: application/octet-stream".
|
|
|
|
If this option is used several times, the ones following the first will append
|
|
data as described in --data.
|