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 a
http://somedomain/foo/
Obligatory Requests way:
import requests resp = requests.head("http://www.google.com") print resp.status_code, resp.text, resp.headers