Reputation: 708
I send curl cmd from shell with --head flag:
curl -k --head http://www.something.com/whatever
is there any way to know from answer headers if this link contains html file can be shown in browser or another type of downloading file (pdf, doc, txt, etc). Thanks.
Upvotes: 0
Views: 41
Reputation: 124646
The response header should contain a Content-Type
field,
for HTML files it should be:
Content-Type: text/html
See also the list of known MIME-types.
Upvotes: 1