Forum Discussion

Stoplight's avatar
Stoplight
Community Manager
7 months ago

Wrong CURL request sample generated for HEAD

Originally posted by user borice to the Stoplight Community on 02/09/2023 at 13:57 ET.

Not sure where bug reports can be submitted, so please excuse my use of this venue to report the following issue. If an endpoint defines the HTTP method as HEAD, the generated CURL sample request looks like this: curl --request HEAD ... however this is incorrect and will result in an error if used:

Warning: Setting custom HTTP method to HEAD with -X/--request may not work the Warning: way you want. Consider using -I/--head instead.

The solution is to use the -I or --head instead of the --request HEAD

No RepliesBe the first to reply