blob: 9873f3356e4fcca000f443129a43399a39f1213b [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001Long: data-urlencode
2Arg: <data>
3Help: HTTP POST data url encoded
4Protocols: HTTP
5See-also: data data-raw
6Added: 7.18.0
7---
8This posts data, similar to the other --data options with the exception
9that this performs URL-encoding.
10
11To be CGI-compliant, the <data> part should begin with a \fIname\fP followed
12by a separator and a content specification. The <data> part can be passed to
13curl using one of the following syntaxes:
14.RS
15.IP "content"
16This will make curl URL-encode the content and pass that on. Just be careful
17so that the content doesn't contain any = or @ symbols, as that will then make
18the syntax match one of the other cases below!
19.IP "=content"
20This will make curl URL-encode the content and pass that on. The preceding =
21symbol is not included in the data.
22.IP "name=content"
23This will make curl URL-encode the content part and pass that on. Note that
24the name part is expected to be URL-encoded already.
25.IP "@filename"
26This will make curl load data from the given file (including any newlines),
27URL-encode that data and pass it on in the POST.
28.IP "name@filename"
29This will make curl load data from the given file (including any newlines),
30URL-encode that data and pass it on in the POST. The name part gets an equal
31sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
32name is expected to be URL-encoded already.
33.RE