[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 102/150: form.d: rephrased somewhat, added two exam
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 102/150: form.d: rephrased somewhat, added two example command lines |
Date: |
Fri, 30 Mar 2018 16:49:16 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 93e7a6ffd128181d1723b6e3b8615a209a9223e9
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Feb 22 08:28:05 2018 +0100
form.d: rephrased somewhat, added two example command lines
---
docs/cmdline-opts/form.d | 42 ++++++++++++++++++++++++++----------------
1 file changed, 26 insertions(+), 16 deletions(-)
diff --git a/docs/cmdline-opts/form.d b/docs/cmdline-opts/form.d
index d95d0cc38..8d04d4193 100644
--- a/docs/cmdline-opts/form.d
+++ b/docs/cmdline-opts/form.d
@@ -12,25 +12,35 @@ Content-Type multipart/form-data according to RFC 2388.
For SMTP and IMAP protocols, this is the mean to compose a multipart mail
message to transmit.
-This enables uploading of binary
-files etc. To force the 'content' part to be a file, prefix the file name with
-an @ sign. To just get the content part from a file, prefix the file name with
-the symbol <. The difference between @ and < is then that @ makes a file get
-attached in the post as a file upload, while the < makes a text field and just
-get the contents for that text field from a file.
-
-Example: to send an image to an HTTP server, where \&'profile' is the name of
-the form-field to which portrait.jpg will be the input:
+This enables uploading of binary files etc. To force the 'content' part to be
+a file, prefix the file name with an @ sign. To just get the content part from
+a file, prefix the file name with the symbol <. The difference between @ and <
+is then that @ makes a file get attached in the post as a file upload, while
+the < makes a text field and just get the contents for that text field from a
+file.
+
+Tell curl to read content from stdin instead of a file by using - as
+filename. This goes for both @ and < constructs. When stdin is used, the
+contents is buffered in memory first by curl to determine its size and allow a
+possible resend. Defining a part's data from a named non-regular file (such
+as a named pipe or similar) is unfortunately not subject to buffering and will
+be effectively read at transmission time; since the full size is unknown
+before the transfer starts, such data is sent as chunks by HTTP and rejected
+by IMAP.
+
+Example: send an image to an HTTP server, where \&'profile' is the name of the
+form-field to which the file portrait.jpg will be the input:
curl -F address@hidden https://example.com/upload.cgi
-To read content from stdin instead of a file, use - as the filename. This goes
-for both @ and < constructs. If stdin is not attached to a regular file, it is
-buffered first to determine its size and allow a possible resend. Defining a
-part's data from a named non-regular file (such as a named pipe or similar) is
-unfortunately not subject to buffering and will be effectively read at
-transmission time; since the full size is unknown before the transfer starts,
-data is sent as chunks by HTTP and rejected by IMAP.
+Example: send a your name and shoe size in two text fields to the server:
+
+ curl -F name=John -F shoesize=11 https://example.com/
+
+Example: send a your essay in a text field to the server. Send it as a plain
+text field, but get the contents for it from a local file:
+
+ curl -F "story=<hugefile.txt" https://example.com/
You can also tell curl what Content-Type to use by using 'type=', in a manner
similar to:
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 147/150: CURLOPT_COOKIEFILE.3: "-" as file name means stdin, (continued)
- [GNUnet-SVN] [gnurl] 147/150: CURLOPT_COOKIEFILE.3: "-" as file name means stdin, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 141/150: http2: mark the connection for close on GOAWAY, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 33/150: Curl_range: add check to ensure "from <= to", gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 36/150: progress-bar.d: update to match implementation, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 41/150: parsedate: s/#if/#ifdef, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 53/150: curl_addrinfo.c: Allow Unix Domain Sockets to compile under Windows, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 46/150: formdata: use the mime-content type function, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 32/150: Curl_range: commonize FTP and FILE range handling, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 92/150: curl --version: show PSL if the run-time lib has it enabled, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 11/150: parsedate: fix date parsing for systems with 32 bit long, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 102/150: form.d: rephrased somewhat, added two example command lines,
gnunet <=
- [GNUnet-SVN] [gnurl] 60/150: http_chunks: don't write chunks twice with CURLOPT_HTTP_TRANSFER_DECODING on, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 62/150: sha256: build with OpenSSL < 0.9.8 too, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 72/150: curl_gssapi: make sure this file too uses our *printf(), gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 61/150: README: language fix, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 119/150: CURLOPT_NOPROXY.3: mention how to list numerical IPv6 addresses, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 80/150: Revert "KNOWN_BUGS: 2.5 curl should not offer "ALPN: h2" when using https-proxy", gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 98/150: RELEASE-NOTES: synced with 2427d94c6, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 116/150: curl_ctype: fix macro redefinition warnings, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 104/150: winbuild: Use CALL to run batch scripts, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 130/150: hostip: fix compiler warning: 'variable set but not used', gnunet, 2018/03/30