mirror of
https://github.com/curl/curl.git
synced 2026-06-02 01:54:39 +03:00
fixed -F to support setting type= even on parts that aren't file-uploads
This commit is contained in:
parent
1faa9d6fd5
commit
0ec4c66fba
6 changed files with 95 additions and 9 deletions
10
docs/curl.1
10
docs/curl.1
|
|
@ -338,7 +338,7 @@ If this option is used twice, the second will again disable silent failure.
|
|||
If this option is used twice, the second will again disable silent failure.
|
||||
.IP "-F/--form <name=content>"
|
||||
(HTTP) This lets curl emulate a filled in form in which a user has pressed the
|
||||
submit button. This causes curl to POST data using the content-type
|
||||
submit button. This causes curl to POST data using the Content-Type
|
||||
multipart/form-data according to RFC1867. This enables uploading of binary
|
||||
files etc. To force the 'content' part to be be a file, prefix the file name
|
||||
with an @ sign. To just get the content part from a file, prefix the file name
|
||||
|
|
@ -355,11 +355,15 @@ input:
|
|||
To read the file's content from stdin insted of a file, use - where the file
|
||||
name should've been. This goes for both @ and < constructs.
|
||||
|
||||
You can also tell curl what Content-Type to use for the file upload part, by
|
||||
using 'type=', in a manner similar to:
|
||||
You can also tell curl what Content-Type to use by using 'type=', in a manner
|
||||
similar to:
|
||||
|
||||
\fBcurl\fP -F "web=@index.html;type=text/html" url.com
|
||||
|
||||
or
|
||||
|
||||
\fBcurl\fP -F "name=daniel;type=text/foo" url.com
|
||||
|
||||
See further examples and details in the MANUAL.
|
||||
|
||||
This option can be used multiple times.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue