def _wrapped(*args, **kwargs): _args = request.headers diff = [item[0].upper() + item[1:] for item in params ] - dict.fromkeys(list(_args.keys())).keys() if diff: return BaseResponse.return_forbidden( '{} is necessary'.format(diff)) return func(*args, **kwargs)
def _wrapped(*args, **kwargs): content_type = request.content_type _args = None if content_type == 'application/x-www-form-urlencoded': _args = request.form elif content_type == 'application/json': _args = request.json else: _args = request.args diff = list(params) - dict.fromkeys(list(_args.keys())).keys() if diff: return BaseResponse.return_forbidden( '{} is necessary'.format(diff)) return func(*args, **kwargs)