data-binary.d 929 B

123456789101112131415161718192021222324
  1. c: Copyright (C) 1998 - 2022, Daniel Stenberg, <[email protected]>, 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. ---
  12. This posts data exactly as specified with no extra processing whatsoever.
  13. If you start the data with the letter @, the rest should be a filename. Data
  14. is posted in a similar manner as --data does, except that newlines and
  15. carriage returns are preserved and conversions are never done.
  16. Like --data the default content-type sent to the server is
  17. application/x-www-form-urlencoded. If you want the data to be treated as
  18. arbitrary binary data by the server then set the content-type to octet-stream:
  19. -H "Content-Type: application/octet-stream".
  20. If this option is used several times, the ones following the first will append
  21. data as described in --data.