urllib2 has different methods for getting response code