def handle_request(self, request):
     method = request['method']
     if method == 'GET':
         return call(self.get, request)
     elif method == 'POST':
         return call(self.post, request)
     elif method == 'PUT':
         return call(self.put, request)
     elif method == 'DELETE':
         return call(self.delete, request)
     return base_endpoint.unsupported_method_response(method)
 async def delete(self, request):
     return base_endpoint.unsupported_method_response('DELETE')
 async def put(self, request):
     return base_endpoint.unsupported_method_response('PUT')
Ejemplo n.º 4
0
 def async_post(self, request):
     return base_endpoint.unsupported_method_response('POST')
Ejemplo n.º 5
0
 def async_get(self, request):
     return base_endpoint.unsupported_method_response('GET')