summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2018-10-02 21:55:57 -0400
committerJay Satiro <raysatiro@yahoo.com>2018-10-03 02:26:28 -0400
commitf33312fe3330363633f379b1d291745184ce01ce (patch)
tree67c745cbb24495edffd2ebcc00b8073d8f9de644
parent9ba67b5b7991d785df16dd1774879b7b8bbe3e78 (diff)
downloadcurl-f33312fe3330363633f379b1d291745184ce01ce.tar.gz
data-binary.d: clarify default content-type is x-www-form-urlencoded
- Advise user that --data-binary sends a default content type of x-www-form-urlencoded, and to have the data treated as arbitrary binary data by the server set the content-type header to octet-stream. Ref: https://github.com/curl/curl/pull/2852#issuecomment-426465094 Closes https://github.com/curl/curl/pull/3085
-rw-r--r--docs/cmdline-opts/data-binary.d5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/cmdline-opts/data-binary.d b/docs/cmdline-opts/data-binary.d
index c6721c641..3f6ff2dbd 100644
--- a/docs/cmdline-opts/data-binary.d
+++ b/docs/cmdline-opts/data-binary.d
@@ -9,5 +9,10 @@ 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.