data-binary.d 930 B

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