Beispiel #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
Beispiel #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
Beispiel #3
0
def askbaidu(mod, data):
    logger.info('in ask baidu!')
    print(mod)
    r = d_requests.get(url=data)  # 最基本的GET请求
    return r
Beispiel #4
0
def askbaidu(stepdata):
    data = stepdata[1]
    logger.info('in ask baidu!')
    r = d_requests.get(url=data)  # 最基本的GET请求
    return r