def api_request(host, url, data=None, method=None):
    if data:
        method = method or 'POST'
    else:
        method = method or 'GET'
    if ssl is False:
        msg.warn('Error importing ssl. Using system python...')
        return proxy_api_request(host, url, data, method)
    try:
        r = hit_url(host, url, data, method)
    except __HOLE__ as e:
        r = e
    except URLError as e:
        msg.warn('Error hitting url ', url, ': ', e)
        r = e
        if not PY2:
            msg.warn('Retrying using system python...')
            return proxy_api_request(host, url, data, method)
    return APIResponse(r)
dataset/ETHPy150Open Floobits/floobits-vim/plugin/floo/common/api.py/api_request