Example #1
0
    async def process(self, func_name, *args, **kwargs):
        """ process the request
        @param func_name choices [_head_, _get_, _post_, _put_,
                                  _delete_, _patch_, _options_]
        @note preparation and finish work
        """
        func = getattr(self, func_name, None)

        if not func:
            raise exceptions.NotFound()
        await self.do_prepare()
        await func(*args, **kwargs)
        await self.do_complete()
Example #2
0
def return_developing():
    raise exceptions.NotFound(msg=exceptions.ERR_MSG_IS_DEVELOPING)