]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CURLOPT_POSTFIELDS.3: Mention curl_easy_escape
authorJay Satiro <raysatiro@yahoo.com>
Wed, 20 May 2015 05:48:31 +0000 (01:48 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Wed, 20 May 2015 05:48:31 +0000 (01:48 -0400)
.. also correct some variable naming in curl_easy_escape.3

Bug: https://github.com/bagder/curl/issues/281
Reported-by: bsammon@users.noreply.github.com
docs/libcurl/curl_easy_escape.3
docs/libcurl/opts/CURLOPT_POSTFIELDS.3

index 7c8c658d296d16196bffe4d12da1df23fc01795c..da2b382215cb469a2b5546bcae469752e153c371 100644 (file)
@@ -29,13 +29,13 @@ curl_easy_escape - URL encodes the given string
 .BI "char *curl_easy_escape( CURL *" curl ", char *" string ", int "length " );"
 .ad
 .SH DESCRIPTION
-This function converts the given input \fBstring\fP to an URL encoded string
+This function converts the given input \fIstring\fP to a URL encoded string
 and returns that as a new allocated string. All input characters that are not
 a-z, A-Z, 0-9, '-', '.', '_' or '~' are converted to their "URL escaped"
 version (%NN where NN is a two-digit hexadecimal number).
 
-If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_escape(3)\fP
-uses strlen() on the input \fBurl\fP to find out the size.
+If \fIlength\fP is set to 0 (zero), \fIcurl_easy_escape(3)\fP uses strlen() on
+the input \fIstring\fP to find out the size.
 
 You must \fIcurl_free(3)\fP the returned string when you're done with it.
 .SH AVAILABILITY
index d55914308b2e1c3d84a65ff82a62dd67590dde79..27e4510b134cc92cc80e252ad9656ed4f2515bf0 100644 (file)
@@ -44,6 +44,9 @@ used by HTML forms. Change Content-Type with \fICURLOPT_HTTPHEADER(3)\fP.
 
 Using \fICURLOPT_POSTFIELDS(3)\fP implies \fICURLOPT_POST(3)\fP.
 
+You can use \fIcurl_easy_escape(3)\fP to url-encode your data, if necessary. It
+returns a pointer to an encoded string that can be passed as \fIpostdata\fP.
+
 If you want to do a zero-byte POST, you need to set
 \fICURLOPT_POSTFIELDSIZE(3)\fP explicitly to zero, as simply setting
 \fICURLOPT_POSTFIELDS(3)\fP to NULL or "" just effectively disables the