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