':type method: str'

@classmethod
def request(cls, method, url, **kwargs):

    methodupper = method.upper()
    hasdata = (u'data' in kwargs)
    if (methodupper == u'GET'):
        if hasdata:
            print(u"ERROR:    Can't    do    HTTP    GET    when    the    'data'    parameter    presents")
            assert False
        resp = ulr.urlopen(url, **kwargs)
    elif (methodupper == u'POST'):
        if hasdata:
            resp = ulr.urlopen(url, **kwargs)
        else:
            resp = ulr.urlopen(url, data=u'', **kwargs)
    else:
        raise NotImplementedError()
    return resp
