xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. |
| 2 | SPDX-License-Identifier: curl |
| 3 | Long: data-binary |
| 4 | Arg: <data> |
| 5 | Help: HTTP POST binary data |
| 6 | Protocols: HTTP |
| 7 | Category: http post upload |
| 8 | Example: --data-binary @filename $URL |
| 9 | Added: 7.2 |
| 10 | See-also: data-ascii |
| 11 | Multi: append |
| 12 | --- |
| 13 | This posts data exactly as specified with no extra processing whatsoever. |
| 14 | |
| 15 | If you start the data with the letter @, the rest should be a filename. Data |
| 16 | is posted in a similar manner as --data does, except that newlines and |
| 17 | carriage returns are preserved and conversions are never done. |
| 18 | |
| 19 | Like --data the default content-type sent to the server is |
| 20 | application/x-www-form-urlencoded. If you want the data to be treated as |
| 21 | arbitrary binary data by the server then set the content-type to octet-stream: |
| 22 | -H "Content-Type: application/octet-stream". |
| 23 | |
| 24 | If this option is used several times, the ones following the first will append |
| 25 | data as described in --data. |