def patch(self, request, uuid, **kwargs): return Response( zmqc.patch('muzzley-platform', '/v3/data-layer/cards/{}'.format(uuid), params=request.args, payload=request.get_json(), headers=request.headers.items()))
def default_zmq_backend(path): _method = request.method.lower() _fn = getattr(zmqc, _method, None) if _fn: return Response( _fn.__call__( _server_key, f'{_path_prefix}{path}', params=request.args if request.args else None, headers=request.headers.items() if request.headers else None, payload=request.get_json() if request.is_json else None)) else: envoxy.log.error( f'Method "{request.method}" not found in "{_path_prefix}{path}" URI handler' )
def get(self, request, **kwargs): return Response( zmqc.get('muzzley-platform', '/v3/data-layer/cards', params=request.args, headers=request.headers.items()))
def delete(self, request, uuid, **kwargs): return Response( zmqc.delete('muzzley-platform', '/v3/data-layer/cards/{}'.format(uuid), headers=request.headers.items()))
def post(self, request, **kwargs): return Response( zmqc.post('muzzley-platform', '/v3/data-layer/cards', payload=request.get_json(), headers=request.headers.items()))