tags:

views:

30

answers:

1

Are theere any functions in 3.x using the http.client.HTTPMessage().get_content_type() ?

+1  A: 

urllib2.urlopen() returns an addinfourl with headers:

>>> import urllib2
>>> f = urllib2.urlopen('http://www.python.org/')
>>> f.headers['content-type']
'text/html'
>>> 
gimel