Пример #1
0
def hello():
    if request.method == 'GET':
        return api_response(
            data={
                'test': 'hello world!'
            }
        )
    elif request.method == 'POST':
        file = request.file[0][1]
        file.create('/Users/Eric/hahahaha.md')
        return request.file
Пример #2
0
def index():
    session['haha'] = 'asdfasdf'
    return api_response(data=session.data, message='this is the session.')
Пример #3
0
def test(variable_data):
    return api_response(data=variable_data)
Пример #4
0
 def post(self, i):
     variable_data = getattr(self, 'variable_data')
     return api_response(data=variable_data)