Lines Matching +full:form +full:- +full:data
1 ---
3 SPDX-License-Identifier: curl
4 Long: data
6 Arg: <data>
7 Help: HTTP POST data
9 Mutexed: form head upload-file
13 See-also:
14 - data-binary
15 - data-urlencode
16 - data-raw
18 - -d "name=curl" $URL
19 - -d "name=curl" -d "tool=cmdline" $URL
20 - -d @filename $URL
21 ---
23 # `--data`
25 Sends the specified data in a POST request to the HTTP server, in the same way
26 that a browser does when a user has filled in an HTML form and presses the
27 submit button. This option makes curl pass the data to the server using the
28 content-type application/x-www-form-urlencoded. Compare to --form.
30 --data-raw is almost the same but does not have a special interpretation of
31 the @ character. To post data purely binary, you should instead use the
32 --data-binary option. To URL-encode the value of a form field you may use
33 --data-urlencode.
36 data pieces specified are merged with a separating &-symbol. Thus, using
37 '-d name=daniel -d skill=lousy' would generate a post chunk that looks like
40 If you start the data with the letter @, the rest should be a filename to read
41 the data from, or - if you want curl to read the data from stdin. Posting data
42 from a file named 'foobar' would thus be done with --data @foobar. When --data
45 interpretation use --data-raw instead.
47 The data for this option is passed on to the server exactly as provided on the
49 user to provide the data in the correct form.