def getHttpParams(request):
"""
Get the HTTP parameters of a request
All the results will be done in upper case, just to make sure that users will be used to define
those variable in uppercases
"""
httpParams = {}
for postValues in request.args.items():
#TODO Find a way to not have this stupid hack
httpParams[postValues[0].replace("amp;", "")] = postValues[1]
for postValues in request.form.items():
httpParams[postValues[0]] = postValues[1]
httpParams['DIRECTORY'] = os.path.join(current_app.config['ROOT_PATH'], config.ARES_USERS_LOCATION)
# Special environment configuration
httpParams['CONFIG'] = {}
httpParams['CONFIG']['WRK'] = config.WORK_PATH
httpParams['CONFIG']['COMPANY'] = config.COMPANY
for source in AUTHORIZED_SOURCES:
httpParams[source] = session.get(source, None)
return httpParams
评论列表
文章目录