示例#1
0
 async def error_handler(request, exception):
     return text('OK', exception.status_code)
示例#2
0
 async def handler(request):
     return text('Hello')
示例#3
0
 async def handler(request):
     headers = {"answer": 42}
     return text('Hello', headers=headers)
示例#4
0
 async def handler(request):
     args[0] = request.args
     return text('OK')
示例#5
0
 async def handler(request):
     arg[0] = request
     return text('OK')
示例#6
0
 def handler(request):
     return text('OK')
示例#7
0
 async def handler2(request):
     return text('OK2')
示例#8
0
 def post(self, request):
     return text('', headers={'method': 'POST'})
示例#9
0
 async def put(self, request):
     return text('', headers={'method': 'PUT'})
示例#10
0
 def get(self, request):
     self._iternal_method()
     return text('I am get method and global var is {}'.format(
         self.global_var))
示例#11
0
        async def get(self, request):
            print('进来了')
            assert request.stream is None

            return text('', headers={'method': 'GET'})
示例#12
0
 async def process_response(request, response):
     return text('OK')
示例#13
0
 async def handler(request):
     return text('FAIL')
示例#14
0
 async def halt_request(request):
     return text('OK')
示例#15
0
 async def handler(request, folder_id):
     results.append(folder_id)
     return text('OK')
示例#16
0
 def head(self, request):
     return text('', headers={'method': 'HEAD'})
示例#17
0
 async def handler(request, weight):
     results.append(weight)
     return text('OK')
示例#18
0
 def options(self, request):
     return text('', headers={'method': 'OPTIONS'})
示例#19
0
 async def handler1(request):
     return text('OK1')
示例#20
0
 async def patch(self, request):
     return text('', headers={'method': 'PATCH'})
示例#21
0
 async def handler(request, name):
     results.append(name)
     return text('OK')
示例#22
0
 def delete(self, request):
     return text('', headers={'method': 'DELETE'})
示例#23
0
 async def handler(request, user_id):
     arg[0] = user_id
     return text('OK')
示例#24
0
 def get(self, request):
     return text('I am get method')
示例#25
0
 def handler(request):
     # print(request.ip)
     return text("{}".format(request.ip))
示例#26
0
 def get(self, request, my_param_here):
     return text('I am get method with %s' % my_param_here)
示例#27
0
 async def handler(request):
     headers = {"spam": "great"}
     return text('Hello', headers=headers)
示例#28
0
 def get(self, request):
     assert request.stream is None
     return text('I am get method')
示例#29
0
 def handler_exception(request, exception):
     return text('Internal Server Error.', 500)
示例#30
0
 def handler(request):
     return text('Hello2')