curl -I -X GET url fetch the body and discards it after fetching or does it just get the header without fetching the body

Viewed 6

While reading about curl I learned that -I will issue the HEAD method, and that it is possible to override any method using the -X argument... for example:

curl -I -X GET https://some-valid-url

will show the header but will use the GET method and not the HEAD method.

My question is: 1- Does the curl command above fetch the body then discards it? 2- or does it just fetch the header as in the HEAD command?

0 Answers
Related