Adam B Adam B - 1 year ago 68
HTTP Question

Is it possible to send "OPTIONS *" with cURL?

From RFC7230 Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing

When a client wishes to request OPTIONS for the server as a whole, as opposed to a specific named resource of that server, the client must send only "*" (%x2A) as the request-target.

To test how my site reacts I want to send the following request to the server.


I know I can use telnet, write my own client, etc.
But I want to know if it's possible to do it with cURL?

This can NOT be done with
, as suggested in a similar, but not identical, question That command will send
. I want to know if it's possible to send the asterisk with cURL.

Answer Source

(speaking as the main curl developer)

I honestly don't think it is possible (that is, using -X OPTIONS etc will send a slash and not an asterisk), although I would of course be very open to making it possible in a future version in case someone wants to join in and help us fix this oversight.