Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
46313be2
Commit
46313be2
authored
20 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
added more header info for PUT and POST requests
parent
723bfe42
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/libcurl/curl_easy_setopt.3
+28
-3
28 additions, 3 deletions
docs/libcurl/curl_easy_setopt.3
with
28 additions
and
3 deletions
docs/libcurl/curl_easy_setopt.3
+
28
−
3
View file @
46313be2
...
...
@@ -483,6 +483,15 @@ options.
You can override the default POST Content-Type: header by setting your own
with \fICURLOPT_HTTPHEADER\fP.
Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
If you use POST to a HTTP 1.1 server, you can send data without knowing the
size before starting the POST if you use chunked encoding. You enable this by
adding a header like "Transfer-Encoding: chunked" with
\fICURLOPT_HTTPHEADER\fP. With HTTP 1.0 or without chunked transfer, you must
specify the size in the request.
NOTE: if you have issued a POST request and want to make a HEAD or GET
instead, you must explictly pick the new request type using
\fICURLOPT_NOBODY\fP or \fICURLOPT_HTTPGET\fP or similar.
...
...
@@ -497,6 +506,9 @@ set that Content-Type by default when this option is used), which is the most
commonly used one by HTML forms. See also the \fICURLOPT_POST\fP. Using
\fICURLOPT_POSTFIELDS\fP implies \fICURLOPT_POST\fP.
Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
\fBNote:\fP to make multipart/formdata posts (aka rfc1867-posts), check out
the \fICURLOPT_HTTPPOST\fP option.
.IP CURLOPT_POSTFIELDSIZE
...
...
@@ -517,6 +529,9 @@ list of 'struct HttpPost' structs properly filled in. The best and most
elegant way to do this, is to use \fIcurl_formadd(3)\fP as documented. The
data in this list must remain intact until you close this curl handle again
with \fIcurl_easy_cleanup(3)\fP.
Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
.IP CURLOPT_REFERER
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
...
...
@@ -762,9 +777,19 @@ libcurl what the expected size of the infile is. This value should be passed
as a curl_off_t. (Added in 7.11.0)
.IP CURLOPT_UPLOAD
A non-zero parameter tells the library to prepare for an upload. The
\fICURLOPT_READDATA\fP and \fICURLOPT_INFILESIZE_LARGE\fP are also interesting
for uploads. If the protocol is HTTP, uploading means using the PUT request
unless you tell libcurl otherwise.
\fICURLOPT_READDATA\fP and \fICURLOPT_INFILESIZEE\fP or
\fICURLOPT_INFILESIZE_LARGE\fP are also interesting for uploads. If the
protocol is HTTP, uploading means using the PUT request unless you tell
libcurl otherwise.
Using PUT with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
If you use PUT to a HTTP 1.1 server, you can upload data without knowing the
size before starting the transfer if you use chunked encoding. You enable this
by adding a header like "Transfer-Encoding: chunked" with
\fICURLOPT_HTTPHEADER\fP. With HTTP 1.0 or without chunked transfer, you must
specify the size.
.IP CURLOPT_MAXFILESIZE
Pass a long as parameter. This allows you to specify the maximum size (in
bytes) of a file to download. If the file requested is larger than this value,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment