request.d 1.5 KB

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