Exemplo n.º 1
0
def getUserList(user_name):
    global jwt_access
    url = '/users/'
    headers = {
        'Content-Type': 'application/json',
        'Authorization': 'Bearer ' + jwt_access[user_name['name']]
    }
    logger.info('in getUserinfo heasers is :{0}'.format(headers))
    r = d_requests.get(url=BASE_URL + url, headers=headers)  # 最基本的GET请求
    logger.info("response is : {0}".format(r))
    return r
Exemplo n.º 2
0
def read_menu(user_name, sid):
    url = '/api/menus/{0}/'.format(str(sid))
    headers = {
        'Content-Type':
        'application/json',
        'Authorization':
        'Bearer ' +
        SkiGlobalData().get_global_data('jwt_access')[user_name['name']]
    }
    r = d_requests.get(url=BASE_URL + url, headers=headers)  # 最基本的GET请求
    logger.info("response is : {0}".format(r.text))
    return r
Exemplo n.º 3
0
Arquivo: send.py Projeto: xglh/BearSki
def askbaidu(mod, data):
    logger.info('in ask baidu!')
    print(mod)
    r = d_requests.get(url=data)  # 最基本的GET请求
    return r
Exemplo n.º 4
0
Arquivo: send.py Projeto: xglh/BearSki
def askbaidu(stepdata):
    data = stepdata[1]
    logger.info('in ask baidu!')
    r = d_requests.get(url=data)  # 最基本的GET请求
    return r