--requestcommand-line options followed by the actual method name. You can, for example, send a
-X, as HEAD is specified to send all the headers a GET response would get but never send a response body, even if the headers otherwise imply that one would come. So, adding
-X HEADto a command line that would otherwise do a GET will cause curl to hang, waiting for a response body that will not come.
-X. It should also be noted that when curl follows redirects like asked to with
-L, the request method set with
-Xwill be sent even on the subsequent redirects.