aboutsummaryrefslogtreecommitdiff
path: root/docs/cmdline-opts/data-urlencode.d
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-11-15 23:44:58 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-11-16 10:42:51 +0100
commit41b1f649bf63e3663fcf3d4a678fef37688e32b7 (patch)
tree4fe54a49307d30025a67a5c83807d857f4bcbeba /docs/cmdline-opts/data-urlencode.d
parent81e61cda396da7eefb15dcf20b9e8be7ada37283 (diff)
downloadgnurl-41b1f649bf63e3663fcf3d4a678fef37688e32b7.tar.gz
gnurl-41b1f649bf63e3663fcf3d4a678fef37688e32b7.tar.bz2
gnurl-41b1f649bf63e3663fcf3d4a678fef37688e32b7.zip
cmdline-docs: more options converted over
Diffstat (limited to 'docs/cmdline-opts/data-urlencode.d')
-rw-r--r--docs/cmdline-opts/data-urlencode.d33
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/cmdline-opts/data-urlencode.d b/docs/cmdline-opts/data-urlencode.d
new file mode 100644
index 000000000..9873f3356
--- /dev/null
+++ b/docs/cmdline-opts/data-urlencode.d
@@ -0,0 +1,33 @@
+Long: data-urlencode
+Arg: <data>
+Help: HTTP POST data url encoded
+Protocols: HTTP
+See-also: data data-raw
+Added: 7.18.0
+---
+This posts data, similar to the other --data options with the exception
+that this performs URL-encoding.
+
+To be CGI-compliant, the <data> part should begin with a \fIname\fP followed
+by a separator and a content specification. The <data> part can be passed to
+curl using one of the following syntaxes:
+.RS
+.IP "content"
+This will make curl URL-encode the content and pass that on. Just be careful
+so that the content doesn't contain any = or @ symbols, as that will then make
+the syntax match one of the other cases below!
+.IP "=content"
+This will make curl URL-encode the content and pass that on. The preceding =
+symbol is not included in the data.
+.IP "name=content"
+This will make curl URL-encode the content part and pass that on. Note that
+the name part is expected to be URL-encoded already.
+.IP "@filename"
+This will make curl load data from the given file (including any newlines),
+URL-encode that data and pass it on in the POST.
+.IP "name@filename"
+This will make curl load data from the given file (including any newlines),
+URL-encode that data and pass it on in the POST. The name part gets an equal
+sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
+name is expected to be URL-encoded already.
+.RE