forwarding

Python: Get HTTP headers from urllib2.urlopen call?

Python: Get HTTP headers from urllib2.urlopen call? Question: Does urllib2 fetch the whole page when a urlopen call is made? I’d like to just read the HTTP response header without getting the page. It looks like urllib2 opens the HTTP connection and then subsequently gets the actual HTML page… or does it just start buffering …

Total answers: 6