👻 See our latest reviews to choose the best laptop for Machine Learning and Deep learning tasks!
What I"m trying to do here is get the headers of a given URL so I can determine the MIME type. I want to be able to see if http://somedomain/foo/
will return an HTML document or a JPEG image for example. Thus, I need to figure out how to send a HEAD request so that I can read the MIME type without having to download the content. Does anyone know of an easy way of doing this?
👻 Read also: what is the best laptop for engineering students in 2022?