Option cleanups: --get is not upload --form* are post - added several options into ldap, smtp, imap and pop3 - shortened the category descriptions in the list category curl fixes: --create-dirs removed from 'curl' --ftp-create-dirs removed from 'curl' --netrc moved to 'auth' from 'curl' --netrc-file moved to 'auth' from 'curl' --netrc-optional moved to 'auth' from 'curl' --no-buffer moved to 'output' from 'curl' --no-clobber removed from 'curl' --output removed from 'curl' --output-dir removed from 'curl' --remove-on-error removed from 'curl' Add a "global" category: - Made all "global" options set this category Add a "deprecated" category: - Moved the deprecated options to it (maybe they should not be in any category long term) Add a 'timeout' category - Put a number of appropriate options in it Add an 'ldap' category - Put the LDAP related option in there Remove categories "ECH" and "ipfs" - They should not be categories. Had only one single option each. Remove category "misc" - It should not be a category as it is impossible to know when to browse it. --use-ascii moved to ftp and output --xattr moved to output --service-name moved to auth Managen fixes: - errors if an option is given a category name that is not already setup for in code - verifies that options set `scope: global` also is put in category `global´ Closes #14101
1.9 KiB
c | SPDX-License-Identifier | Long | Short | Arg | Help | Category | Added | Multi | See-also | Example | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. | curl | request | X | <method> | Specify request method to use | connection pop3 ftp imap smtp | 6.0 | single |
|
|
--request
Change the method to use when starting the transfer.
curl passes on the verbatim string you give it in the request without any filter or other safe guards. That includes white space and control characters.
HTTP
Specifies a custom request method to use when communicating with the HTTP server. The specified request method is used instead of the method otherwise used (which defaults to GET). Read the HTTP 1.1 specification for details and explanations. Common additional HTTP requests include PUT and DELETE, while related technologies like WebDAV offers PROPFIND, COPY, MOVE and more.
Normally you do not need this option. All sorts of GET, HEAD, POST and PUT requests are rather invoked by using dedicated command line options.
This option only changes the actual word used in the HTTP request, it does not alter the way curl behaves. For example if you want to make a proper HEAD request, using -X HEAD does not suffice. You need to use the --head option.
The method string you set with --request is used for all requests, which if you for example use --location may cause unintended side-effects when curl does not change request method according to the HTTP 30x response codes - and similar.
FTP
Specifies a custom FTP command to use instead of LIST when doing file lists with FTP.
POP3
Specifies a custom POP3 command to use instead of LIST or RETR. (Added in 7.26.0)
IMAP
Specifies a custom IMAP command to use instead of LIST. (Added in 7.30.0)
SMTP
Specifies a custom SMTP command to use instead of HELP or VRFY. (Added in 7.34.0)