Пример #1
0
 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()))
Пример #2
0
            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'
                    )
Пример #3
0
 def get(self, request, **kwargs):
     return Response(
         zmqc.get('muzzley-platform',
                  '/v3/data-layer/cards',
                  params=request.args,
                  headers=request.headers.items()))
Пример #4
0
 def delete(self, request, uuid, **kwargs):
     return Response(
         zmqc.delete('muzzley-platform',
                     '/v3/data-layer/cards/{}'.format(uuid),
                     headers=request.headers.items()))
Пример #5
0
 def post(self, request, **kwargs):
     return Response(
         zmqc.post('muzzley-platform',
                   '/v3/data-layer/cards',
                   payload=request.get_json(),
                   headers=request.headers.items()))