def _mainType(self, resp):
        """ gets the main type from the response object"""
        if self.PY2:
            return resp.headers.maintype
        elif self.PY3:
            return resp.headers.get_content_maintype()
        else:
            return None