blob: 3919d426a5120c7704ce12c7a9074595474e5102 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001Long: request
2Short: X
3Arg: <command>
4Help: Specify request command to use
5---
6(HTTP) Specifies a custom request method to use when communicating with the
7HTTP server. The specified request method will be used instead of the method
8otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
9details and explanations. Common additional HTTP requests include PUT and
10DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and
11more.
12
13Normally you don't need this option. All sorts of GET, HEAD, POST and PUT
14requests are rather invoked by using dedicated command line options.
15
16This option only changes the actual word used in the HTTP request, it does not
17alter the way curl behaves. So for example if you want to make a proper HEAD
18request, using -X HEAD will not suffice. You need to use the --head option.
19
20The method string you set with --request will be used for all requests, which
21if you for example use --location may cause unintended side-effects when curl
22doesn't change request method according to the HTTP 30x response codes - and
23similar.
24
25(FTP)
26Specifies a custom FTP command to use instead of LIST when doing file lists
27with FTP.
28
29(POP3)
30Specifies a custom POP3 command to use instead of LIST or RETR. (Added in
317.26.0)
32
33(IMAP)
34Specifies a custom IMAP command to use instead of LIST. (Added in 7.30.0)
35
36(SMTP)
37Specifies a custom SMTP command to use instead of HELP or VRFY. (Added in 7.34.0)
38
39If this option is used several times, the last one will be used.