How to send an HTTP OPTIONS request from the command line?

I tried to use cURL, but it seems that by default (Debian) is not compiled with HTTPS support, and I do not want to create it myself.

wget seems to support SSL, but I did not find information on how to generate an HTTP OPTIONS request using wget.

+56
curl wget
Jan 23 '13 at 14:16
source share
1 answer

Debian's default twist supports HTTPS with great precision. (long ago there were two separate packages: one with one and without SSL, but this is not so)

You can send an OPTIONS request with curl as follows:

 curl -i -X OPTIONS http://example.org/path 

You can also use -v instead of -i to see more results.

sending "OPTIONS *"

To send the usual * (instead of the path, see RFC 7231 ) using the OPTIONS method, you need to minimize 7.55.0 or later, as then, you can run the command line, for example:

 curl -i --request-target "*" -X OPTIONS http://example.org 
+84
Jan 23 '13 at 21:23
source



All Articles