mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
new binary post details
This commit is contained in:
parent
53c2798886
commit
1be0bf56a6
22
docs/curl.1
22
docs/curl.1
@ -2,7 +2,7 @@
|
|||||||
.\" nroff -man curl.1
|
.\" nroff -man curl.1
|
||||||
.\" Written by Daniel Stenberg
|
.\" Written by Daniel Stenberg
|
||||||
.\"
|
.\"
|
||||||
.TH curl 1 "1 August 2000" "Curl 7.0" "Curl Manual"
|
.TH curl 1 "24 August 2000" "Curl 7.2" "Curl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl \- get a URL with FTP, TELNET, LDAP, GOPHER, DICT, FILE, HTTP or
|
curl \- get a URL with FTP, TELNET, LDAP, GOPHER, DICT, FILE, HTTP or
|
||||||
HTTPS syntax.
|
HTTPS syntax.
|
||||||
@ -88,16 +88,26 @@ If used with uploads, the ftp server command SIZE will not be used by
|
|||||||
curl. Upload resume is for FTP only.
|
curl. Upload resume is for FTP only.
|
||||||
HTTP resume is only possible with HTTP/1.1 or later servers.
|
HTTP resume is only possible with HTTP/1.1 or later servers.
|
||||||
.IP "-d/--data <data>"
|
.IP "-d/--data <data>"
|
||||||
(HTTP)
|
(HTTP) Sends the specified data in a POST request to the HTTP server. Note
|
||||||
Sends the specified data in a POST request to the HTTP server. Note
|
that the data is sent exactly as specified with no extra processing (with all
|
||||||
that the data is sent exactly as specified with no extra processing.
|
newlines cut off). The data is expected to be "url-encoded". This will cause
|
||||||
The data is expected to be "url-encoded". This will cause curl to
|
curl to pass the data to the server using the content-type
|
||||||
pass the data to the server using the content-type
|
|
||||||
application/x-www-form-urlencoded. Compare to -F.
|
application/x-www-form-urlencoded. Compare to -F.
|
||||||
|
|
||||||
If you start the data with the letter @, the rest should be a file name to
|
If you start the data with the letter @, the rest should be a file name to
|
||||||
read the data from, or - if you want curl to read the data from stdin.
|
read the data from, or - if you want curl to read the data from stdin.
|
||||||
The contents of the file must already be url-encoded.
|
The contents of the file must already be url-encoded.
|
||||||
|
|
||||||
|
To post data purely binary, you should instead use the --data-binary option.
|
||||||
|
|
||||||
|
-d/--data is the same as --data-ascii.
|
||||||
|
.IP "--data-ascii <data>"
|
||||||
|
(HTTP) This is an alias for the -d/--data option.
|
||||||
|
.IP "--data-binary <data>"
|
||||||
|
(HTTP) This posts data in a similar manner as --data-ascii does, although when
|
||||||
|
using this option the entire context of the posted data is kept as-is. If you
|
||||||
|
want to post a binary file without the strip-newlines feature of the
|
||||||
|
--data-ascii option, this is for you.
|
||||||
.IP "-D/--dump-header <file>"
|
.IP "-D/--dump-header <file>"
|
||||||
(HTTP/FTP)
|
(HTTP/FTP)
|
||||||
Write the HTTP headers to this file. Write the FTP file info to this
|
Write the HTTP headers to this file. Write the FTP file info to this
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
.\" nroff -man [file]
|
.\" nroff -man [file]
|
||||||
.\" Written by daniel@haxx.se
|
.\" Written by daniel@haxx.se
|
||||||
.\"
|
.\"
|
||||||
.TH curl_easy_setopt 3 "16 June 2000" "Curl 7.0" "libcurl Manual"
|
.TH curl_easy_setopt 3 "24 August 2000" "Curl 7.2" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_easy_setopt - Set curl easy-session options
|
curl_easy_setopt - Set curl easy-session options
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -19,6 +19,8 @@ options are set with the
|
|||||||
followed by a parameter. That parameter can be a long, a function pointer or
|
followed by a parameter. That parameter can be a long, a function pointer or
|
||||||
an object pointer, all depending on what the option in question expects. Read
|
an object pointer, all depending on what the option in question expects. Read
|
||||||
this manual carefully as bad input values may cause libcurl to behave badly!
|
this manual carefully as bad input values may cause libcurl to behave badly!
|
||||||
|
You can only set one option in each function call. A typical application uses
|
||||||
|
many calls in the setup phase.
|
||||||
|
|
||||||
The
|
The
|
||||||
.I "handle"
|
.I "handle"
|
||||||
@ -117,7 +119,7 @@ CURLOPT_INFILE and CURLOPT_INFILESIZE are also interesting for uploads.
|
|||||||
A non-zero parameter tells the library to do a regular HTTP post. This is a
|
A non-zero parameter tells the library to do a regular HTTP post. This is a
|
||||||
normal application/x-www-form-urlencoded kind, which is the most commonly used
|
normal application/x-www-form-urlencoded kind, which is the most commonly used
|
||||||
one by HTML forms. See the CURLOPT_POSTFIELDS option for how to specify the
|
one by HTML forms. See the CURLOPT_POSTFIELDS option for how to specify the
|
||||||
data to post.
|
data to post and CURLOPT_POSTFIELDSIZE in how to set the data size.
|
||||||
.TP
|
.TP
|
||||||
.B CURLOPT_FTPLISTONLY
|
.B CURLOPT_FTPLISTONLY
|
||||||
A non-zero parameter tells the library to just list the names of an ftp
|
A non-zero parameter tells the library to just list the names of an ftp
|
||||||
@ -188,6 +190,12 @@ few minutes risk aborting perfectly normal operations.
|
|||||||
Pass a char * as parameter, which should be the full data to post in a HTTP
|
Pass a char * as parameter, which should be the full data to post in a HTTP
|
||||||
post operation. See also the CURLOPT_POST.
|
post operation. See also the CURLOPT_POST.
|
||||||
.TP
|
.TP
|
||||||
|
.B CURLOPT_POSTFIELDSIZE
|
||||||
|
If you want to post data to the server without letting libcurl do a strlen()
|
||||||
|
to measure the data size, this option must be used. Also, when this option is
|
||||||
|
used, you can post fully binary data which otherwise is likely to fail. If
|
||||||
|
this size is set to zero, the library will use strlen() to get the data size.
|
||||||
|
.TP
|
||||||
.B CURLOPT_REFERER
|
.B CURLOPT_REFERER
|
||||||
Pass a pointer to a zero terminated string as parameter. It will be used to
|
Pass a pointer to a zero terminated string as parameter. It will be used to
|
||||||
set the referer: header in the http request sent to the remote server. This
|
set the referer: header in the http request sent to the remote server. This
|
||||||
|
Loading…
Reference in New Issue
Block a user